コード例 #1
0
 void OnDestroy()
 {
     if (s_instance == this)
     {
         s_instance = null;
     }
 }
コード例 #2
0
        //------------------------------------------------------
        // unity system function
        //------------------------------------------------------

        void Awake()
        {
            Assert.IsTrue(s_instance == null || s_instance == this, "BackEventNotifier alread exists.");
            s_instance = this;
        }