generated from max/template-unity-project
Compare commits
3 Commits
ReadableFi
...
main
Author | SHA1 | Date | |
---|---|---|---|
8453143918 | |||
1b9c367221 | |||
4fe602e932 |
@ -92,7 +92,7 @@ private void LoadScenePartitions(SortedSet<ulong> partitionIds)
|
|||||||
|
|
||||||
// Add always load ids.
|
// Add always load ids.
|
||||||
SortedSet<ulong> baseIds = GetAlwaysLoadIds();
|
SortedSet<ulong> baseIds = GetAlwaysLoadIds();
|
||||||
foreach (var id in baseIds)
|
foreach (ulong id in baseIds)
|
||||||
{
|
{
|
||||||
partitionIds.Add(id);
|
partitionIds.Add(id);
|
||||||
}
|
}
|
||||||
@ -129,6 +129,8 @@ private void LoadScenePartitions(SortedSet<ulong> partitionIds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AssetDatabase.Refresh();
|
AssetDatabase.Refresh();
|
||||||
|
// 'Reload' the scene to prevent the user getting the popup 'Scene has been changed on disk'.
|
||||||
|
EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Single);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,6 +141,9 @@ public void Save()
|
|||||||
{
|
{
|
||||||
using (new ProfilerUtility.ProfilerScope($"{nameof(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.
|
DeleteLoadedPartitions(); // Delete the loaded partitions from disk so we can write the new ones.
|
||||||
|
|
||||||
string pattern = @"&(\d+)";
|
string pattern = @"&(\d+)";
|
||||||
|
Loading…
Reference in New Issue
Block a user