/// <summary> /// Unfortunately Unity 4.3 and earlier doesn't offer a way to properly process events outside of OnGUI. /// </summary> void OnGUI() { if (Event.current.rawType == EventType.KeyDown && mInput.isStaitc == false) { mInput.ProcessEvent(Event.current); } }
/// <summary> /// Unfortunately Unity 4.3 and earlier doesn't offer a way to properly process events outside of OnGUI. /// </summary> void OnGUI() { if (Event.current.rawType == EventType.KeyDown) { mInput.ProcessEvent(Event.current); } }
static int _m_ProcessEvent(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UIInput __cl_gen_to_be_invoked = (UIInput)translator.FastGetCSObj(L, 1); try { { UnityEngine.Event ev = (UnityEngine.Event)translator.GetObject(L, 2, typeof(UnityEngine.Event)); bool __cl_gen_ret = __cl_gen_to_be_invoked.ProcessEvent(ev); LuaAPI.lua_pushboolean(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }