void OnDestroy() { if (instance == this) { instance = null; } }
//Stack<GameObject> activeCanvasStack = new Stack<GameObject>(); /* * public void InsertStack(GameObject ob) * { * if ( ob.GetComponent<GUI_Dialog>() ) * { * ob.gameObject.SetActive(true); * activeCanvasStack.Push(ob); * } * } */ void Awake() { instance = this; //scrollbarABDownload.gameObject.SetActive(false); //Debug.LogError (PlayerPrefs.GetString (PlayerPrefHandler.keyUserName)); }