mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 01:48:07 +08:00
Skip private/anonymous types in TypeCompleter results
This commit is contained in:
1 parent
1a01c740e2
commit
d7ab0a23c6
1 file changed
+12
-1
@@ -1,6 +1,7 @@
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UniverseLib;
|
||||
using UniverseLib.UI;
|
||||
using UniverseLib.UI.Models;
|
||||
@@ -67,7 +68,17 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
|
||||
{
|
||||
allowedTypes = new();
|
||||
foreach (var entry in ReflectionUtility.AllTypes)
|
||||
allowedTypes.Add(entry.Value);
|
||||
{
|
||||
// skip <PrivateImplementationDetails> and <AnonymousClass> classes
|
||||
var type = entry.Value;
|
||||
if (type.FullName.Contains("PrivateImplementationDetails")
|
||||
|| type.FullName.Contains("DisplayClass")
|
||||
|| type.FullName.Contains('<'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
allowedTypes.Add(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user