예제 #1
0
 private void Awake()
 {
     if (musicaControle != null)
     {
         Destroy(gameObject);
     }
     else
     {
         musicaControle = this;
         DontDestroyOnLoad(gameObject);
     }
 }
예제 #2
0
 private void Awake()        //Singleton
 {
     if (musicaControle != null)
     {
         Destroy(gameObject);
     }
     else
     {
         musicaControle = this;
         GameObject.DontDestroyOnLoad(gameObject);
     }
 }