static int _CreateFramework_LuaUtility(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("Framework.LuaUtility.ctor"); #endif try { int count = LuaDLL.lua_gettop(L); if (count == 0) { Framework.LuaUtility obj = new Framework.LuaUtility(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Framework.LuaUtility.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static void Send2Lua(int id, byte[] bytes) { try { LuaByteBuffer byteBuffer = new LuaByteBuffer(bytes); LuaUtility.CallLuaModuleMethod("Protol.ProtoProcess", "Process", id, byteBuffer); } catch (Exception e) { LogHelper.PrintError(string.Format("[LuaNetUtility]Send2Lua error,id:{0},info:{1}.", id, e.ToString())); } }
protected void OnDestroy() { LuaUtility.ClearMemory(); /* * Debug.Log("~" + name + " was destroy!"); * * ClearClick(); #if ASYNC_MODE * string abName = name.ToLower().Replace("panel", ""); * ResManager.UnloadAssetBundle(abName + AppConst.ExtName); #endif * */ }
static int OnInitialize(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("Framework.LuaUtility.OnInitialize"); #endif try { ToLua.CheckArgsCount(L, 1); Framework.LuaUtility obj = (Framework.LuaUtility)ToLua.CheckObject <Framework.LuaUtility>(L, 1); obj.OnInitialize(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int _CreateFramework_LuaUtility(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { Framework.LuaUtility obj = new Framework.LuaUtility(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Framework.LuaUtility.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
protected void OnDisable() { LuaUtility.CallLuaTableMethod(luaName, "OnDisable"); }
protected void Start() { LuaUtility.CallLuaTableMethod(luaName, "Start"); }
protected void Awake() { luaName = name + "Ctrl"; LuaUtility.CallLuaTableMethod(luaName, "Awake", gameObject); }