From c71748d22ac63dec09b2fb54b6969c166f757bba Mon Sep 17 00:00:00 2001
From: Sinai <49360850+sinai-dev@users.noreply.github.com>
Date: Wed, 23 Mar 2022 19:02:17 +1100
Subject: [PATCH] Remove pointless ToArray() call
---
src/ObjectExplorer/SceneHandler.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ObjectExplorer/SceneHandler.cs b/src/ObjectExplorer/SceneHandler.cs
index 3467d5d..3269197 100644
--- a/src/ObjectExplorer/SceneHandler.cs
+++ b/src/ObjectExplorer/SceneHandler.cs
@@ -26,7 +26,7 @@ namespace UnityExplorer.ObjectExplorer
private static Scene? selectedScene;
/// The GameObjects in the currently inspected scene.
- public static GameObject[] CurrentRootObjects { get; private set; } = new GameObject[0];
+ public static IEnumerable CurrentRootObjects { get; private set; } = new GameObject[0];
/// All currently loaded Scenes.
public static List LoadedScenes { get; private set; } = new();
@@ -129,7 +129,7 @@ namespace UnityExplorer.ObjectExplorer
if (go.transform.parent == null && !go.scene.IsValid())
objects.Add(go);
}
- CurrentRootObjects = objects.ToArray();
+ CurrentRootObjects = objects;
}
}
}