static int Initialize(IntPtr L) { try { ToLua.CheckArgsCount(L, 0); LuaFacade.Initialize(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private static IEnumerator InitializeAsync() { yield return(CoroutineManager.DoCoroutine(LuaFacade.UpdateLocalScripts())); yield return(CoroutineManager.DoCoroutine(LuaFacade.UpdateLocalProtos())); LuaFacade.Initialize(); AddressablesUpdater.RequestDownloadHandle = OnRequestDownload; AddressablesUpdater.OnDownload += OnDownload; AddressablesUpdater.AfterDownloadHandle = OnAfterDownload; AddressablesUpdater.OnCompleted += OnCompleted; new GameObject("AddressablesUpdater").AddComponent <AddressablesUpdater>(); }
private static void OnCompleted() { if (hotUpdateClass != null) { if (hotUpdateObject != null) { hotUpdateClass.Call("OnDestroy", hotUpdateObject); hotUpdateObject.Dispose(); hotUpdateObject = null; } hotUpdateClass.Dispose(); hotUpdateClass = null; GameObject.DestroyImmediate(LuaClient.Instance.gameObject); LuaFacade.Initialize(); } LuaFacade.SendNotification("StartUp"); }