static int UnloadSceneSuccess(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); LuaSceneTool.UnloadSceneSuccess(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
IEnumerator UnloadScene() { mUnloadAsync = SceneManager.UnloadSceneAsync(mUnloadSceneIndex); while (!mUnloadAsync.isDone) { SetLoading(mUnloadAsync.progress); yield return(new WaitForEndOfFrame()); } if (mUnloadAsync.isDone) { LuaSceneTool.UnloadSceneSuccess(mUnloadSceneIndex); SetLoading(1.0f); StartLoadScene(); } yield return(new WaitForEndOfFrame()); }