static int _e_OnAudioConfigurationChanged(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); UnityEngine.AudioSettings.AudioConfigurationChangeHandler gen_delegate = translator.GetDelegate <UnityEngine.AudioSettings.AudioConfigurationChangeHandler>(L, 2); if (gen_delegate == null) { return(LuaAPI.luaL_error(L, "#2 need UnityEngine.AudioSettings.AudioConfigurationChangeHandler!")); } if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) { UnityEngine.AudioSettings.OnAudioConfigurationChanged += gen_delegate; return(0); } if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) { UnityEngine.AudioSettings.OnAudioConfigurationChanged -= gen_delegate; return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.AudioSettings.OnAudioConfigurationChanged!")); }
static internal int checkDelegate(IntPtr l, int p, out UnityEngine.AudioSettings.AudioConfigurationChangeHandler ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, p)) { ua = null; return(op); } else if (LuaDLL.lua_isuserdata(l, p) == 1) { ua = (UnityEngine.AudioSettings.AudioConfigurationChangeHandler)checkObj(l, p); return(op); } if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } LuaDelegate ld; checkType(l, -1, out ld); LuaDLL.lua_pop(l, 1); if (ld.d != null) { ua = (UnityEngine.AudioSettings.AudioConfigurationChangeHandler)ld.d; return(op); } l = LuaState.get(l).L; ua = (bool a1) => { int error = pushTry(l); pushValue(l, a1); ld.pcall(1, error); LuaDLL.lua_settop(l, error - 1); }; ld.d = ua; return(op); }
static bool AudioSettings_remove_OnAudioConfigurationChanged__AudioConfigurationChangeHandler(JSVCall vc, int argc) { int len = argc; if (len == 1) { UnityEngine.AudioSettings.AudioConfigurationChangeHandler action = JSDataExchangeMgr.GetJSArg <UnityEngine.AudioSettings.AudioConfigurationChangeHandler>(() => { if (JSApi.isFunctionS((int)JSApi.GetType.Arg)) { return(AudioSettings_remove_OnAudioConfigurationChanged_GetDelegate_member3_arg0(JSApi.getFunctionS((int)JSApi.GetType.Arg))); } else { return((UnityEngine.AudioSettings.AudioConfigurationChangeHandler)JSMgr.datax.getObject((int)JSApi.GetType.Arg)); } }); UnityEngine.AudioSettings.OnAudioConfigurationChanged -= action; } return(true); }