Ejemplo n.º 1
0
	// Use this for initialization
	void Awake () {
		if (singleton == null) {
			singleton = this;
		} else {
			GameObject.Destroy(gameObject);
		}
	}
Ejemplo n.º 2
0
	public static TreeVis getTreeVis(){
		if (singleton == null) {
			GameObject TreeSaveManagerGo = new GameObject();
			singleton = TreeSaveManagerGo.AddComponent<TreeVis>();
		}
		return singleton;
	}