Skip to content

Commit

Permalink
Update SaveDuringPlay.cs (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
glabute authored May 10, 2024
1 parent 6159bb2 commit a738b0f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public static List<GameObject> FindAllRootObjectsInOpenScenes()
{
var allRoots = new List<GameObject>();
for (int i = 0; i < SceneManager.sceneCount; ++i)
allRoots.AddRange(SceneManager.GetSceneAt(i).GetRootGameObjects());
if (SceneManager.GetSceneAt(i).isLoaded)
allRoots.AddRange(SceneManager.GetSceneAt(i).GetRootGameObjects());
return allRoots;
}

Expand Down

0 comments on commit a738b0f

Please sign in to comment.