Skip to content

Commit 690e327

Browse files
committed
Ignore invalid Scenes while caching build settings
1 parent 0c62192 commit 690e327

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Assets/Editor Toolbox/Runtime/Serialization/SceneSerializationUtility.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ private static void RefreshCache()
4343
var buildIndex = -1;
4444
foreach (var scene in EditorBuildSettings.scenes)
4545
{
46+
if (string.IsNullOrEmpty(scene.path))
47+
{
48+
continue;
49+
}
50+
4651
buildIndex++;
4752
var sceneIndex = scene.enabled ? buildIndex : InvalidSceneIndex;
4853
var sceneAsset = EditorGUIUtility.Load(scene.path) as SceneAsset;

0 commit comments

Comments
 (0)