| | |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaScript", _g_get_luaScript); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "fileName", _g_get_fileName); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "injections", _g_get_injections); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaScript", _s_set_luaScript); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "fileName", _s_set_fileName); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "injections", _s_set_injections); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_luaScript(RealStatePtr L) |
| | | static int _g_get_fileName(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | LuaBehaviour gen_to_be_invoked = (LuaBehaviour)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.luaScript); |
| | | LuaAPI.lua_pushstring(L, gen_to_be_invoked.fileName); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_luaScript(RealStatePtr L) |
| | | static int _s_set_fileName(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | LuaBehaviour gen_to_be_invoked = (LuaBehaviour)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.luaScript = (UnityEngine.TextAsset)translator.GetObject(L, 2, typeof(UnityEngine.TextAsset)); |
| | | gen_to_be_invoked.fileName = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |