private void CreateSfxSourceContainers(Sfx[] effectTypes, string containerName) { GameObject sfxConteiner = AudioManager.Instance.CreateNewGameObjectContainer(containerName, transform); foreach (var UIEffect in effectTypes) { GameObject musicSourceObject = new GameObject(); UIEffect.SetSource(musicSourceObject.AddComponent <AudioSource>(), AudioManager.Instance.GetAudioMixerOutputChannel("Sfx")); musicSourceObject.name = UIEffect.SoundName; musicSourceObject.transform.SetParent(sfxConteiner.transform); } }