static public int GetFloat(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); System.String a1; checkType(l, 2, out a1); System.Single a2; checkType(l, 3, out a2); var ret = self.GetFloat(a1, out a2); pushValue(l, true); pushValue(l, ret); pushValue(l, a2); return(3); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
float Mixer_Get_Float(AudioMixer Mixer, string param){ float temp; Mixer.GetFloat (MIXER_BGM_VOLUME, out temp); temp = Mathf.InverseLerp (MIXER_MIN_VOLUME, MIXER_MAX_VOLUME, temp); return temp; }