generated from max/template-unity-project
Save scene on save
- Check if the user wants to save the dirty scene on save
This commit is contained in:
parent
40c49b076e
commit
4fe602e932
@ -92,7 +92,7 @@ private void LoadScenePartitions(SortedSet<ulong> partitionIds)
|
||||
|
||||
// Add always load ids.
|
||||
SortedSet<ulong> 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+)";
|
||||
|
Loading…
Reference in New Issue
Block a user