Esempio n. 1
0
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         AudioListener.DontDestroyOnLoad(this);
         music      = GetComponent <AudioSource>();
         music.clip = startClip;
         music.loop = true;
     }
 }