public void PlayMusic(string track) { AudioClip to = null; switch (track) { case "Menu": to = main.menuMusic; break; case "Field": to = main.fieldMusic; break; } if (to) { StartCoroutine(main.CrossFade(to)); } }