Skip to content

Commit

Permalink
Fix adding buildIndex scenes to freeIndexes
Browse files Browse the repository at this point in the history
  • Loading branch information
mofrison committed Jun 30, 2020
1 parent 3d07d88 commit c1df5ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Runtime/Core/SceneSub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static void RemoveOp(string sceneName)
LayerKernel.LoadJobs.Add(SceneManager.UnloadSceneAsync(sceneName));
LayerKernel.LoadJobs.Add(Resources.UnloadUnusedAssets());
loadedScenes.Remove(sceneName);
freeIndexes.Push(layerIndex);
if (layerIndex >= SceneManager.sceneCountInBuildSettings) { freeIndexes.Push(layerIndex); }
}

internal static int GetLayerIndex(string sceneName)
Expand Down

0 comments on commit c1df5ef

Please sign in to comment.