diff --git a/Editor/ScenePartitionSO.cs b/Editor/ScenePartitionSO.cs index 11cb951..744107e 100644 --- a/Editor/ScenePartitionSO.cs +++ b/Editor/ScenePartitionSO.cs @@ -92,7 +92,7 @@ private void LoadScenePartitions(SortedSet partitionIds) // Add always load ids. SortedSet baseIds = GetAlwaysLoadIds(); - foreach (var id in baseIds) + foreach (ulong id in baseIds) { partitionIds.Add(id); } @@ -139,6 +139,9 @@ public void Save() { using (new ProfilerUtility.ProfilerScope($"{nameof(Save)}")) { + // Check if the user wants to save the scene if dirty. + if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) return; + DeleteLoadedPartitions(); // Delete the loaded partitions from disk so we can write the new ones. string pattern = @"&(\d+)";