diff --git a/src/UI/ObjectExplorer/ObjectSearch.cs b/src/UI/ObjectExplorer/ObjectSearch.cs index 008e9a8..34a9b89 100644 --- a/src/UI/ObjectExplorer/ObjectSearch.cs +++ b/src/UI/ObjectExplorer/ObjectSearch.cs @@ -101,7 +101,7 @@ namespace UnityExplorer.UI.ObjectExplorer { m_context = (SearchContext)value; - bool shouldShowGoFilters = m_context == SearchContext.GameObject || m_context == SearchContext.UnityObject; + bool shouldShowGoFilters = m_context == SearchContext.UnityObject; sceneFilterRow.SetActive(shouldShowGoFilters); childFilterRow.SetActive(shouldShowGoFilters); @@ -177,7 +177,7 @@ namespace UnityExplorer.UI.ObjectExplorer unityObjectClassRow = UIFactory.CreateHorizontalGroup(uiRoot, "UnityClassRow", false, true, true, true, 2, new Vector4(2, 2, 2, 2)); UIFactory.SetLayoutElement(unityObjectClassRow, minHeight: 25, flexibleHeight: 0); - var unityClassLbl = UIFactory.CreateLabel(unityObjectClassRow, "UnityClassLabel", "Custom Type:", TextAnchor.MiddleLeft); + var unityClassLbl = UIFactory.CreateLabel(unityObjectClassRow, "UnityClassLabel", "Class filter:", TextAnchor.MiddleLeft); UIFactory.SetLayoutElement(unityClassLbl.gameObject, minWidth: 110, flexibleWidth: 0); var classInputField = UIFactory.CreateInputField(unityObjectClassRow, "ClassInput", "..."); diff --git a/src/UI/ObjectExplorer/SearchProvider.cs b/src/UI/ObjectExplorer/SearchProvider.cs index 7601f78..04753e0 100644 --- a/src/UI/ObjectExplorer/SearchProvider.cs +++ b/src/UI/ObjectExplorer/SearchProvider.cs @@ -13,7 +13,7 @@ namespace UnityExplorer.UI.ObjectExplorer public enum SearchContext { UnityObject, - GameObject, + // GameObject, Singleton, StaticClass } @@ -61,9 +61,9 @@ namespace UnityExplorer.UI.ObjectExplorer Type searchType; switch (context) { - case SearchContext.GameObject: - searchType = typeof(GameObject); - break; + //case SearchContext.GameObject: + // searchType = typeof(GameObject); + // break; case SearchContext.UnityObject: default: @@ -100,7 +100,7 @@ namespace UnityExplorer.UI.ObjectExplorer if (!string.IsNullOrEmpty(input)) nameFilter = input; - bool canGetGameObject = context == SearchContext.GameObject || typeof(Component).IsAssignableFrom(searchType); + bool canGetGameObject = searchType == typeof(GameObject) || typeof(Component).IsAssignableFrom(searchType); foreach (var obj in allObjects) { @@ -110,7 +110,7 @@ namespace UnityExplorer.UI.ObjectExplorer if (canGetGameObject) { - var go = context == SearchContext.GameObject + var go = searchType == typeof(GameObject) ? obj.TryCast() : obj.TryCast().gameObject;