mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2024-12-23 01:59:40 +08:00
Skip private/anonymous types in TypeCompleter results
This commit is contained in:
parent
1a01c740e2
commit
d7ab0a23c6
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user