mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-15 22:07:48 +08:00
1.4.5 finalize
Will be pushed when MelonLoader releases 0.2.7.
This commit is contained in:
parent
1ab41f5a30
commit
abcb548706
@ -24,7 +24,7 @@ namespace Explorer
|
||||
{
|
||||
if (this.MemberInfo != null)
|
||||
{
|
||||
switch (this.MemberInfoType)
|
||||
switch (this.MemberInfo.MemberType)
|
||||
{
|
||||
case MemberTypes.Field:
|
||||
m_entryType = (MemberInfo as FieldInfo).FieldType.GetGenericArguments()[0];
|
||||
|
@ -152,8 +152,6 @@ namespace Explorer
|
||||
|
||||
private void Evaluate()
|
||||
{
|
||||
m_evaluated = true;
|
||||
|
||||
var mi = MemberInfo as MethodInfo;
|
||||
|
||||
object ret = null;
|
||||
@ -161,6 +159,7 @@ namespace Explorer
|
||||
if (!HasParameters)
|
||||
{
|
||||
ret = mi.Invoke(mi.IsStatic ? null : DeclaringInstance, new object[0]);
|
||||
m_evaluated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -199,6 +198,7 @@ namespace Explorer
|
||||
if (arguments.Count == m_arguments.Length)
|
||||
{
|
||||
ret = mi.Invoke(mi.IsStatic ? null : DeclaringInstance, arguments.ToArray());
|
||||
m_evaluated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -41,17 +41,6 @@ namespace Explorer
|
||||
}
|
||||
}
|
||||
|
||||
public MemberTypes MemberInfoType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (MemberInfo is FieldInfo) return MemberTypes.Field;
|
||||
if (MemberInfo is PropertyInfo) return MemberTypes.Property;
|
||||
if (MemberInfo is MethodInfo) return MemberTypes.Method;
|
||||
return MemberTypes.All;
|
||||
}
|
||||
}
|
||||
|
||||
// methods
|
||||
public virtual void Init() { }
|
||||
public abstract void DrawValue(Rect window, float width);
|
||||
@ -202,7 +191,7 @@ namespace Explorer
|
||||
{
|
||||
GUILayout.Label("<color=red>Reflection failed!</color> (" + ReflectionException + ")", null);
|
||||
}
|
||||
else if (Value == null && MemberInfoType != MemberTypes.Method)
|
||||
else if (Value == null && MemberInfo?.MemberType != MemberTypes.Method)
|
||||
{
|
||||
GUILayout.Label("<i>null (" + ValueType + ")</i>", null);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ namespace Explorer
|
||||
|
||||
private bool ShouldProcessMember(CacheObjectBase holder)
|
||||
{
|
||||
if (m_filter != MemberTypes.All && m_filter != holder.MemberInfoType) return false;
|
||||
if (m_filter != MemberTypes.All && m_filter != holder.MemberInfo?.MemberType) return false;
|
||||
|
||||
if (!string.IsNullOrEmpty(holder.ReflectionException) && m_hideFailedReflection) return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user