public void Start() { Console.AddCvarMethod("soundVolume", this, "soundVolume", "Sound Volume", this.help[0], this.SetSoundVolume); Console.AddCvarMethod("musicVolume", this, "musicVolume", "Music Volume", this.help[1], this.SetMusicVolume); Console.AddKeyword("mute", this.ToggleMute); foreach (AudioSource sound in FindObjectsOfType(typeof(AudioSource))) { if (sound.clip == null) { continue; } this.sounds[sound.clip.name] = sound; } Transform musicGroup = GameObject.Find("Music").transform; this.listener = (AudioListener)FindObjectOfType(typeof(AudioListener)); this.playlist = musicGroup.GetComponentsInChildren <AudioSource>(true); }