コード例 #1
0
    void Awake()
    {
        #region Singleton

        // Singleton
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        #endregion
    }
コード例 #2
0
 private void Awake()
 {
     _instance   = this;
     skillCanvas = this.GetComponent <Canvas>();
 }