コード例 #1
0
 void Awake()
 {
     if (Instance)
     {
         DestroyImmediate(gameObject);
     }
     else
     {
         DontDestroyOnLoad(gameObject);
         Instance = this;
     }
 }
コード例 #2
0
ファイル: music.cs プロジェクト: rahim16ou/Catcheep
 void Awake()
 {
     loadingTimeData();
     if (Instance)
     {
         DestroyImmediate(gameObject);
     }
     else
     {
         DontDestroyOnLoad(gameObject);
         Instance = this;
     }
 }