コード例 #1
0
ファイル: RegionDict.cs プロジェクト: RhythNS/RunAndGun
 private void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
コード例 #2
0
ファイル: RegionDict.cs プロジェクト: RhythNS/RunAndGun
 private void Awake()
 {
     if (Instance)
     {
         Debug.LogWarning("RegionDict already in scene. Deleting myself!");
         Destroy(this);
         return;
     }
     Instance = this;
 }