コード例 #1
0
 static public void PlayGameMusic()
 {
     if (instance != null)
     {
         if (instance.source != null)
         {
             instance.source.Stop();
             instance.source.clip = instance.levelMusic[LevelManager.ActualScene()];
             instance.source.Play();
             instance.source.loop = true;
         }
     }
     else
     {
         Debug.LogError("Unavailable MusicPlayer component");
     }
 }