AudioMixer asset.
static public int set_outputAudioMixerGroup(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); UnityEngine.Audio.AudioMixerGroup v; checkType(l, 2, out v); self.outputAudioMixerGroup = v; pushValue(l, true); return(1); } 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 }
static public int set_updateMode(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); UnityEngine.Audio.AudioMixerUpdateMode v; v = (UnityEngine.Audio.AudioMixerUpdateMode)LuaDLL.luaL_checkinteger(l, 2); self.updateMode = v; pushValue(l, true); return(1); } 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 }
static int DOComplete(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)ToLua.CheckObject <UnityEngine.Audio.AudioMixer>(L, 1); int o = obj.DOComplete(); LuaDLL.lua_pushinteger(L, o); return(1); } else if (count == 2) { UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)ToLua.CheckObject <UnityEngine.Audio.AudioMixer>(L, 1); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); int o = obj.DOComplete(arg0); LuaDLL.lua_pushinteger(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Audio.AudioMixer.DOComplete")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int FindSnapshot(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); var ret = self.FindSnapshot(a1); pushValue(l, true); pushValue(l, ret); return(2); } 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 }
EventStatus IEventListener.Process(Fabric.Event zEvent) { if (_audioMixers.Count == 0) { return(EventStatus.Not_Handled); } switch (zEvent.EventAction) { case EventAction.LoadAudioMixer: { UnityEngine.Audio.AudioMixer audioMixer3 = Resources.Load((string)zEvent._parameter) as UnityEngine.Audio.AudioMixer; if (audioMixer3 != null) { _audioMixers.Add(audioMixer3); } break; } case EventAction.UnloadAudioMixer: { UnityEngine.Audio.AudioMixer audioMixer2 = _audioMixers.Find((UnityEngine.Audio.AudioMixer x) => x.name.Contains((string)zEvent._parameter)); if (audioMixer2 != null) { _audioMixers.Remove(audioMixer2); Resources.UnloadAsset(audioMixer2); } break; } case EventAction.TransitionToSnapshot: { TransitionToSnapshotData transitionToSnapshotData = (TransitionToSnapshotData)zEvent._parameter; if (transitionToSnapshotData == null) { break; } for (int i = 0; i < _audioMixers.Count; i++) { UnityEngine.Audio.AudioMixer audioMixer = _audioMixers[i]; if (audioMixer != null) { AudioMixerSnapshot audioMixerSnapshot = audioMixer.FindSnapshot(transitionToSnapshotData._snapshot); if (audioMixerSnapshot != null) { audioMixerSnapshot.TransitionTo(transitionToSnapshotData._timeToReach); } } } break; } } return(EventStatus.Handled); }
static public int get_outputAudioMixerGroup(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); pushValue(l, self.outputAudioMixerGroup); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static public int get_outputAudioMixerGroup(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); pushValue(l, true); pushValue(l, self.outputAudioMixerGroup); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int get_updateMode(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); pushValue(l, true); pushEnum(l, (int)self.updateMode); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int set_updateMode(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); UnityEngine.Audio.AudioMixerUpdateMode v; checkEnum(l, 2, out v); self.updateMode = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int ClearFloat(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); System.String a1; checkType(l, 2, out a1); self.ClearFloat(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_outputAudioMixerGroup(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); UnityEngine.Audio.AudioMixerGroup v; checkType(l, 2, out v); self.outputAudioMixerGroup = v; return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static public int set_outputAudioMixerGroup(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); UnityEngine.Audio.AudioMixerGroup v; checkType(l, 2, out v); self.outputAudioMixerGroup = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int ClearFloat(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); System.String a1; checkType(l, 2, out a1); var ret = self.ClearFloat(a1); pushValue(l, ret); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static public int FindMatchingGroups(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); System.String a1; checkType(l, 2, out a1); var ret = self.FindMatchingGroups(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
static int DOFlip(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)ToLua.CheckObject <UnityEngine.Audio.AudioMixer>(L, 1); int o = obj.DOFlip(); LuaDLL.lua_pushinteger(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int FindSnapshot(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)ToLua.CheckObject <UnityEngine.Audio.AudioMixer>(L, 1); string arg0 = ToLua.CheckString(L, 2); UnityEngine.Audio.AudioMixerSnapshot o = obj.FindSnapshot(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int ClearFloat(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)ToLua.CheckObject <UnityEngine.Audio.AudioMixer>(L, 1); string arg0 = ToLua.CheckString(L, 2); bool o = obj.ClearFloat(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_AudioMixer(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityGameFramework.Runtime.SoundComponent obj = (UnityGameFramework.Runtime.SoundComponent)o; UnityEngine.Audio.AudioMixer ret = obj.AudioMixer; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index AudioMixer on a nil value" : e.Message)); } }
static int TransitionToSnapshots(IntPtr L) { try { ToLua.CheckArgsCount(L, 4); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)ToLua.CheckObject <UnityEngine.Audio.AudioMixer>(L, 1); UnityEngine.Audio.AudioMixerSnapshot[] arg0 = ToLua.CheckObjectArray <UnityEngine.Audio.AudioMixerSnapshot>(L, 2); float[] arg1 = ToLua.CheckNumberArray <float>(L, 3); float arg2 = (float)LuaDLL.luaL_checknumber(L, 4); obj.TransitionToSnapshots(arg0, arg1, arg2); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_updateMode(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)o; UnityEngine.Audio.AudioMixerUpdateMode arg0 = (UnityEngine.Audio.AudioMixerUpdateMode)ToLua.CheckObject(L, 2, typeof(UnityEngine.Audio.AudioMixerUpdateMode)); obj.updateMode = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index updateMode on a nil value")); } }
static int get_updateMode(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)o; UnityEngine.Audio.AudioMixerUpdateMode ret = obj.updateMode; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index updateMode on a nil value")); } }
static int get_outputAudioMixerGroup(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)o; UnityEngine.Audio.AudioMixerGroup ret = obj.outputAudioMixerGroup; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index outputAudioMixerGroup on a nil value")); } }
static int set_outputAudioMixerGroup(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)o; UnityEngine.Audio.AudioMixerGroup arg0 = (UnityEngine.Audio.AudioMixerGroup)ToLua.CheckObject <UnityEngine.Audio.AudioMixerGroup>(L, 2); obj.outputAudioMixerGroup = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index outputAudioMixerGroup on a nil value")); } }
static public int GetFloat(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); System.String a1; checkType(l, 2, out a1); System.Single 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)); } }
// Start is called before the first frame update void OnEnable() { mixer = output.audioMixer; if (PlayerPrefs.HasKey(output.name)) { startVol = PlayerPrefs.GetFloat(output.name); mixer.SetFloat(output.name, startVol); } else { mixer.GetFloat(output.name, out startVol); } slider.minValue = 0; slider.maxValue = 100; slider.value = startVol + 80; }
static public int TransitionToSnapshots(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); UnityEngine.Audio.AudioMixerSnapshot[] a1; checkType(l, 2, out a1); System.Single[] a2; checkType(l, 3, out a2); System.Single a3; checkType(l, 4, out a3); self.TransitionToSnapshots(a1, a2, a3); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static int GetFloat(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)ToLua.CheckObject <UnityEngine.Audio.AudioMixer>(L, 1); string arg0 = ToLua.CheckString(L, 2); float arg1; bool o = obj.GetFloat(arg0, out arg1); LuaDLL.lua_pushboolean(L, o); LuaDLL.lua_pushnumber(L, arg1); return(2); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int DOSetFloat(IntPtr L) { try { ToLua.CheckArgsCount(L, 4); UnityEngine.Audio.AudioMixer obj = (UnityEngine.Audio.AudioMixer)ToLua.CheckObject <UnityEngine.Audio.AudioMixer>(L, 1); string arg0 = ToLua.CheckString(L, 2); float arg1 = (float)LuaDLL.luaL_checknumber(L, 3); float arg2 = (float)LuaDLL.luaL_checknumber(L, 4); DG.Tweening.Core.TweenerCore <float, float, DG.Tweening.Plugins.Options.FloatOptions> o = obj.DOSetFloat(arg0, arg1, arg2); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int TransitionToSnapshots(IntPtr l) { try { UnityEngine.Audio.AudioMixer self = (UnityEngine.Audio.AudioMixer)checkSelf(l); UnityEngine.Audio.AudioMixerSnapshot[] a1; checkType(l, 2, out a1); System.Single[] a2; checkType(l, 3, out a2); System.Single a3; checkType(l, 4, out a3); self.TransitionToSnapshots(a1, a2, a3); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
public void CreateWeatherSound() { UniStormSystem UniStormSystemObject = GameObject.Find("UniStorm System").GetComponent <UniStormSystem>(); if (UniStormSystemObject.enabled) { GameObject Temp = new GameObject(); Temp.AddComponent <AudioSource>(); AudioSource _AS = Temp.GetComponent <AudioSource>(); _AS.clip = WeatherSound; _AS.volume = 0; _AS.loop = true; UnityEngine.Audio.AudioMixer m_AudioMixer = Resources.Load("UniStorm Audio Mixer") as UnityEngine.Audio.AudioMixer; _AS.outputAudioMixerGroup = m_AudioMixer.FindMatchingGroups("Master/Weather")[0]; Temp.name = WeatherTypeName + " (UniStorm)"; Temp.transform.SetParent(GameObject.Find("UniStorm Sounds").transform); Temp.transform.position = new Vector3(Temp.transform.parent.position.x, Temp.transform.parent.position.y, Temp.transform.parent.position.z); UniStormSystemObject.WeatherSoundsList.Add(_AS); } }
public AudioMixerGroupController(AudioMixer owner) { Internal_CreateAudioMixerGroupController(this, owner); }
internal static extern bool CheckForCyclicReferences(AudioMixer mixer, AudioMixerGroup group);
public static void initSoundManager(AudioMixer am) { mixer = am; }
public override void ShowGUI() { #if UNITY_5 numSnapshots = EditorGUILayout.IntSlider ("Number of snapshots:", numSnapshots, 1, 10); if (numSnapshots == 1) { snapshot = (AudioMixerSnapshot) EditorGUILayout.ObjectField ("Snapshot:", snapshot, typeof (AudioMixerSnapshot), false); } else { audioMixer = (AudioMixer) EditorGUILayout.ObjectField ("Audio mixer:", audioMixer, typeof (AudioMixer), false); if (numSnapshots < snapshotMixes.Count) { snapshotMixes.RemoveRange (numSnapshots, snapshotMixes.Count - numSnapshots); } else if (numSnapshots > snapshotMixes.Count) { if (numSnapshots > snapshotMixes.Capacity) { snapshotMixes.Capacity = numSnapshots; } for (int i=snapshotMixes.Count; i<numSnapshots; i++) { snapshotMixes.Add (new SnapshotMix ()); } } for (int i=0; i<snapshotMixes.Count; i++) { snapshotMixes[i].snapshot = (AudioMixerSnapshot) EditorGUILayout.ObjectField ("Snapshot " + (i+1).ToString () + ":", snapshotMixes[i].snapshot, typeof (AudioMixerSnapshot), false); snapshotMixes[i].weight = EditorGUILayout.FloatField ("Weight " + (i+1).ToString () + ":", snapshotMixes[i].weight); } } changeTime = EditorGUILayout.Slider ("Transition time (s):", changeTime, 0f, 10f); if (changeTime > 0f) { willWait = EditorGUILayout.Toggle ("Wait until finish?", willWait); } #else EditorGUILayout.HelpBox ("This Action is only available for Unity 5", MessageType.Info); #endif AfterRunningOption (); }
public AudioMixerSnapshotController(AudioMixer owner) { Internal_CreateAudioMixerSnapshotController(this, owner); }
private static extern void Internal_CreateAudioMixerSnapshotController(AudioMixerSnapshotController mono, AudioMixer owner);