Pause timescale when game is paused
This commit is contained in:
@@ -62,19 +62,28 @@ public class SceneBrowserWindow : EditorWindow
|
||||
if (GUILayout.Button("Refresh"))
|
||||
RefreshScenes();
|
||||
_scroll = EditorGUILayout.BeginScrollView(_scroll);
|
||||
|
||||
// Create a safe copy to avoid collection modification during enumeration
|
||||
var foldersCopy = _scenesByFolder.Keys.ToList();
|
||||
|
||||
// Top-level scenes
|
||||
if (_scenesByFolder.ContainsKey(""))
|
||||
if (foldersCopy.Contains("") && _scenesByFolder.ContainsKey(""))
|
||||
{
|
||||
foreach (var scene in _scenesByFolder[""])
|
||||
var topLevelScenes = _scenesByFolder[""].ToList();
|
||||
foreach (var scene in topLevelScenes)
|
||||
DrawSceneRow(scene);
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
// Subfolders
|
||||
foreach (var kvp in _scenesByFolder)
|
||||
foreach (var folderKey in foldersCopy)
|
||||
{
|
||||
if (string.IsNullOrEmpty(kvp.Key)) continue;
|
||||
EditorGUILayout.LabelField(kvp.Key, EditorStyles.boldLabel);
|
||||
foreach (var scene in kvp.Value)
|
||||
if (string.IsNullOrEmpty(folderKey)) continue;
|
||||
if (!_scenesByFolder.ContainsKey(folderKey)) continue;
|
||||
|
||||
EditorGUILayout.LabelField(folderKey, EditorStyles.boldLabel);
|
||||
var scenesInFolder = _scenesByFolder[folderKey].ToList();
|
||||
foreach (var scene in scenesInFolder)
|
||||
DrawSceneRow(scene);
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user