static int OnDestroy(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Framework.Singleton <Framework.SceneMgr> obj = (Framework.Singleton <Framework.SceneMgr>)ToLua.CheckObject <Framework.Singleton <Framework.SceneMgr> >(L, 1); obj.OnDestroy(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Init(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Framework.Singleton <Framework.LuaUtility> obj = (Framework.Singleton <Framework.LuaUtility>)ToLua.CheckObject <Framework.Singleton <Framework.LuaUtility> >(L, 1); obj.Init(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Init(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("Framework.Singleton<Framework.LuaUtility>.Init"); #endif try { ToLua.CheckArgsCount(L, 1); Framework.Singleton <Framework.LuaUtility> obj = (Framework.Singleton <Framework.LuaUtility>)ToLua.CheckObject <Framework.Singleton <Framework.LuaUtility> >(L, 1); obj.Init(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static void Destroy() { Singleton.ReleaseManager <T>(); _isCreated = false; _instance.Dispose(); }