Exemplo n.º 1
0
 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));
     }
 }
Exemplo n.º 2
0
    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());
    }