示例#1
0
        // Support recompile and reset the singleton instance.
#if UNITY_EDITOR
        void Update()
        {
            if (_instance == null)
            {
                _instance = this;
            }
        }
示例#2
0
 /**
  * Set the singleton instance as well as deactivating if the game just started.
  */
 void Awake()
 {
     _instance = this;
 }