diff --git a/src/ObjectExplorer/ObjectSearch.cs b/src/ObjectExplorer/ObjectSearch.cs index 202e169..4c02896 100644 --- a/src/ObjectExplorer/ObjectSearch.cs +++ b/src/ObjectExplorer/ObjectSearch.cs @@ -53,8 +53,8 @@ namespace UnityExplorer.ObjectExplorer if (m_context == SearchContext.Singleton) currentResults = SearchProvider.SingletonSearch(nameInputField.Text); - else if (m_context == SearchContext.StaticClass) - currentResults = SearchProvider.StaticClassSearch(nameInputField.Text); + else if (m_context == SearchContext.Class) + currentResults = SearchProvider.ClassSearch(nameInputField.Text); else { string compType = ""; @@ -130,7 +130,7 @@ namespace UnityExplorer.ObjectExplorer if (!cachedCellTexts.ContainsKey(index)) { string text; - if (m_context == SearchContext.StaticClass) + if (m_context == SearchContext.Class) text = SignatureHighlighter.Parse(currentResults[index] as Type, true); else text = ToStringUtility.ToStringWithType(currentResults[index], currentResults[index]?.GetActualType()); @@ -143,7 +143,7 @@ namespace UnityExplorer.ObjectExplorer private void OnCellClicked(int dataIndex) { - if (m_context == SearchContext.StaticClass) + if (m_context == SearchContext.Class) InspectorManager.Inspect(currentResults[dataIndex] as Type); else InspectorManager.Inspect(currentResults[dataIndex]); diff --git a/src/ObjectExplorer/SearchProvider.cs b/src/ObjectExplorer/SearchProvider.cs index ce8b7e1..2b7936f 100644 --- a/src/ObjectExplorer/SearchProvider.cs +++ b/src/ObjectExplorer/SearchProvider.cs @@ -13,9 +13,8 @@ namespace UnityExplorer.ObjectExplorer public enum SearchContext { UnityObject, - // GameObject, Singleton, - StaticClass + Class } public enum ChildFilter @@ -134,7 +133,7 @@ namespace UnityExplorer.ObjectExplorer return results; } - internal static List StaticClassSearch(string input) + internal static List ClassSearch(string input) { var list = new List(); @@ -144,11 +143,10 @@ namespace UnityExplorer.ObjectExplorer foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) { - foreach (var type in asm.TryGetTypes().Where(it => it.IsSealed && it.IsAbstract)) + foreach (var type in asm.TryGetTypes()) { if (!string.IsNullOrEmpty(nameFilter) && !type.FullName.ContainsIgnoreCase(nameFilter)) continue; - list.Add(type); } }