Ejemplo n.º 1
0
        public void AssignAudio(ZonalAudio_SO registry, string name)
        {
            // assign mixer group
            _mixerGroup = registry.mixerGroup;

            // Find registry have the audio or not
            ZonalAudioInfo locatedAudioInfo = Array.Find(registry.minorAudios, minorAudio => minorAudio.name == name);

            if (locatedAudioInfo == null)
            {
                Debug.LogError($"Audio selected ({name}) is not available in the registry, please set audioInfo again...");
            }
            else
            {
                audioInfo = locatedAudioInfo;
                AddAudioSource();
            }
        }
Ejemplo n.º 2
0
 // Constructor
 public ZonalAudioManager(ZonalAudio_SO registry, string name, GameObject __gameObject)
 {
     _gameObject = __gameObject;
     AssignAudio(registry, name);
 }