Skip to content

Instantly share code, notes, and snippets.

@darthbator
Created February 19, 2014 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darthbator/9083914 to your computer and use it in GitHub Desktop.
Save darthbator/9083914 to your computer and use it in GitHub Desktop.
Singleton!
using UnityEngine;
using System.Collections;
public class SomeClass : MonoBehavior {
public string bullShit = "It puts some data in here";
static private SomeClass instance;
static public SomeClass Instance {get{return instance;}}
void Start () {
instance = this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment