Esempio n. 1
0
        public static bool SetAudioConfigWhitTagName(string tagName, AudioConfigData config)
        {
            AudioConfigData data = AudioController.GetAudioConfigDataById(AudioConfig.dic_Config[tagName]);

            if (data != null)
            {
                data = config;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
 public void ApplyAudioConfigAndPlay(AudioConfigData config)
 {
     source.playOnAwake           = false;
     source.clip                  = AudioQueues[queuesIndex].audioClip;
     source.bypassEffects         = config.bypassEffects;
     source.bypassListenerEffects = config.bypassLisenterEffects;
     source.bypassReverbZones     = config.bypassReverbZones;
     source.loop                  = config.loop;
     source.priority              = config.priority;
     source.volume                = config.volume;
     source.pitch                 = config.pitch;
     source.spatialBlend          = config.spatialBlend;
     source.reverbZoneMix         = config.reverbZonMix;
     source.maxDistance           = config.maxDistance;
     source.minDistance           = config.minDistance;
     source.Play();
 }