Make AllTypes protected, force using GetTypeByName

This commit is contained in:
Sinai
2021-06-07 19:26:46 +10:00
parent 16335c1bc4
commit a72877befb
3 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ namespace UnityExplorer.UI.ObjectExplorer
lastCheckedTypeInput = desiredTypeInput;
//var type = ReflectionUtility.GetTypeByName(desiredTypeInput);
if (ReflectionUtility.AllTypes.TryGetValue(desiredTypeInput, out var cachedType))
if (ReflectionUtility.GetTypeByName(desiredTypeInput) is Type cachedType)
{
var type = cachedType;
lastTypeCanHaveGO = typeof(Component).IsAssignableFrom(type) || type == typeof(GameObject);