Skip to content

Commit

Permalink
Merge pull request #75 from Zenodeon/SceneSerializationUtility-Delete…
Browse files Browse the repository at this point in the history
…d-Scene-Check

Update SceneSerializationUtility.cs
  • Loading branch information
arimger committed Apr 16, 2023
2 parents 06742b1 + 4ad5149 commit 102bee4
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ private static void RefreshCache()
var buildIndex = -1;
foreach (var scene in EditorBuildSettings.scenes)
{
if (string.IsNullOrEmpty(scene.path))
{
continue;
}

buildIndex++;

var sceneIndex = scene.enabled ? buildIndex : InvalidSceneIndex;
var sceneAsset = EditorGUIUtility.Load(scene.path) as SceneAsset;
if (sceneAsset != null)
Expand Down Expand Up @@ -80,4 +86,4 @@ public static bool TryGetSceneData(SceneAsset sceneAsset, out SceneData data)

public static int InvalidSceneIndex => -1;
}
}
}

0 comments on commit 102bee4

Please sign in to comment.