Inheritance: UnityEngine.MonoBehaviour
コード例 #1
0
 protected void Awake()
 {
     try
     {
         if (instance == null)
         {
             DontDestroyOnLoad(this);
             instance     = this;
             this.enabled = false;
             return;
         }
         Destroy(this);
     }
     catch (Exception ex)
     {
         MyLogger.Exception(ex);
     }
 }
コード例 #2
0
 protected void Awake()
 {
     try
     {
         if (instance == null)
         {
             DontDestroyOnLoad(this);
             instance = this;
             this.enabled = false;
             return;
         }
         Destroy(this);
     }
     catch (Exception ex)
     {
         MyLogger.Exception(ex);
     }
 }