public bool Add(KAudioComponent newAudio)
        {
            if (Audios == null)
            {
                Audios = new List <KAudioComponent>();
            }

            if (Audios.Count >= LimitAudio)
            {
                return(false);
            }

            Audios.Add(newAudio);
            newAudio._Sound.source.outputAudioMixerGroup = this.Mixer;

            if (Settings != null)
            {
                foreach (var settings in Settings)
                {
                    if (settings != null)
                    {
                        settings.Setting(newAudio);
                    }
#if UNITY_EDITOR
                    //else
                    //Debug.LogError("Settings is missing");
#endif
                }
            }

            return(true);
        }
Exemple #2
0
 public override void Setting(KAudioComponent Source)
 {
     base.Setting(Source);
     Setting(Source._Sound.source);
 }
Exemple #3
0
 public virtual void Setting(KAudioComponent Source)
 {
 }