From 26d85394d20296fee742764a482d7f70ac84ae08 Mon Sep 17 00:00:00 2001 From: Chatchai Saratakij Date: Sun, 30 Jul 2023 18:20:22 +0700 Subject: [PATCH] Fixed : minor bug --- .../Editor/CustomSceneListScriptableObject.cs | 10 + .../SceneSelector/Editor/SceneSelector.uxml | 2 +- Logs/AssetImportWorker0-prev.log | 1920 +---------------- Logs/AssetImportWorker0.log | 864 +------- Logs/AssetImportWorker1-prev.log | 1880 +--------------- Logs/AssetImportWorker1.log | 746 +------ UserSettings/Layouts/default-2022.dwlt | 84 +- 7 files changed, 264 insertions(+), 5242 deletions(-) diff --git a/Assets/SceneSelector/Editor/CustomSceneListScriptableObject.cs b/Assets/SceneSelector/Editor/CustomSceneListScriptableObject.cs index 561221a..a597e2a 100644 --- a/Assets/SceneSelector/Editor/CustomSceneListScriptableObject.cs +++ b/Assets/SceneSelector/Editor/CustomSceneListScriptableObject.cs @@ -27,6 +27,11 @@ public Setting(bool enabled, SceneAsset sceneAsset) internal void ApplyToBuildSetting() { + if (settings == null) + { + return; + } + bool isNonValidSceneFound = settings.Any(x => (x.scene == null)); if (isNonValidSceneFound) @@ -65,6 +70,11 @@ internal void ImportFromBuildSetting() internal void CleanUp() { + if (settings == null) + { + return; + } + var validSettings = settings.Where(x => (x.scene != null)) .GroupBy(x => x.scene) .Select(x => x.First()); diff --git a/Assets/SceneSelector/Editor/SceneSelector.uxml b/Assets/SceneSelector/Editor/SceneSelector.uxml index d6cd4e9..2027c94 100644 --- a/Assets/SceneSelector/Editor/SceneSelector.uxml +++ b/Assets/SceneSelector/Editor/SceneSelector.uxml @@ -2,7 +2,7 @@