コード例 #1
0
ファイル: Jukebox.cs プロジェクト: eriksk/LD33
 void Awake()
 {
     if (instance != null && instance != this) {
         Destroy(gameObject);
         return;
     } else {
         instance = this;
     }
     DontDestroyOnLoad(gameObject);
 }
コード例 #2
0
ファイル: Jukebox.cs プロジェクト: eriksk/LD33
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
         return;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(gameObject);
 }