Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit c71748d

Browse files
committed
Remove pointless ToArray() call
1 parent 621035c commit c71748d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ObjectExplorer/SceneHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal set
2626
private static Scene? selectedScene;
2727

2828
/// <summary>The GameObjects in the currently inspected scene.</summary>
29-
public static GameObject[] CurrentRootObjects { get; private set; } = new GameObject[0];
29+
public static IEnumerable<GameObject> CurrentRootObjects { get; private set; } = new GameObject[0];
3030

3131
/// <summary>All currently loaded Scenes.</summary>
3232
public static List<Scene> LoadedScenes { get; private set; } = new();
@@ -129,7 +129,7 @@ internal static void Update()
129129
if (go.transform.parent == null && !go.scene.IsValid())
130130
objects.Add(go);
131131
}
132-
CurrentRootObjects = objects.ToArray();
132+
CurrentRootObjects = objects;
133133
}
134134
}
135135
}

0 commit comments

Comments
 (0)