Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections;
using System.Security.Cryptography;
using System.Text;
public class EncryptedPlayerPrefs {
// Encrypted PlayerPrefs
// Written by Sven Magnus
// MD5 code by Matthew Wegner (from [url]http://www.unifycommunity.com/wiki/index.php?title=MD5[/url])
/*
PreviewLabs.PlayerPrefs
Public Domain
To the extent possible under law, PreviewLabs has waived all copyright and related or neighboring rights to this document. This work is published from: Belgium.
http://www.previewlabs.com
*/
// Shows the share sheet with the given items with a list of excludedActivityTypes. See Apple\'s docs for more information on excludedActivityTypes.
public static void shareItems( string[] items, string[] excludedActivityTypes )
// Shows the Facebook composer with optional image path and link
public static void showFacebookComposer( string message, string imagePath, string link )
// Only applies to iOS level Twitter account (Settings -> Twitter)! Shows the tweet composer with the status message and optional image and link.
public static void showTweetComposer( string status, string pathToImage, string link )
@ftvs
ftvs / tk2dTweenAlpha
Created March 7, 2013 13:12
Alpha tween for 2D toolkit sprites. Inherits NGUI's UITweener.
// Alpha tween for 2D toolkit sprites. Uses same method signatures as NGUI's
// TweenAlpha.
using UnityEngine;
using System.Collections;
[RequireComponent (typeof(tk2dBaseSprite))]
public class tk2dTweenAlpha : UITweener
{
public float from = 0f;