mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-04 00:23:31 +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)
|
if (this.MemberInfo != null)
|
||||||
{
|
{
|
||||||
switch (this.MemberInfoType)
|
switch (this.MemberInfo.MemberType)
|
||||||
{
|
{
|
||||||
case MemberTypes.Field:
|
case MemberTypes.Field:
|
||||||
m_entryType = (MemberInfo as FieldInfo).FieldType.GetGenericArguments()[0];
|
m_entryType = (MemberInfo as FieldInfo).FieldType.GetGenericArguments()[0];
|
||||||
|
@ -152,8 +152,6 @@ namespace Explorer
|
|||||||
|
|
||||||
private void Evaluate()
|
private void Evaluate()
|
||||||
{
|
{
|
||||||
m_evaluated = true;
|
|
||||||
|
|
||||||
var mi = MemberInfo as MethodInfo;
|
var mi = MemberInfo as MethodInfo;
|
||||||
|
|
||||||
object ret = null;
|
object ret = null;
|
||||||
@ -161,6 +159,7 @@ namespace Explorer
|
|||||||
if (!HasParameters)
|
if (!HasParameters)
|
||||||
{
|
{
|
||||||
ret = mi.Invoke(mi.IsStatic ? null : DeclaringInstance, new object[0]);
|
ret = mi.Invoke(mi.IsStatic ? null : DeclaringInstance, new object[0]);
|
||||||
|
m_evaluated = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -199,6 +198,7 @@ namespace Explorer
|
|||||||
if (arguments.Count == m_arguments.Length)
|
if (arguments.Count == m_arguments.Length)
|
||||||
{
|
{
|
||||||
ret = mi.Invoke(mi.IsStatic ? null : DeclaringInstance, arguments.ToArray());
|
ret = mi.Invoke(mi.IsStatic ? null : DeclaringInstance, arguments.ToArray());
|
||||||
|
m_evaluated = true;
|
||||||
}
|
}
|
||||||
else
|
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
|
// methods
|
||||||
public virtual void Init() { }
|
public virtual void Init() { }
|
||||||
public abstract void DrawValue(Rect window, float width);
|
public abstract void DrawValue(Rect window, float width);
|
||||||
@ -202,7 +191,7 @@ namespace Explorer
|
|||||||
{
|
{
|
||||||
GUILayout.Label("<color=red>Reflection failed!</color> (" + ReflectionException + ")", null);
|
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);
|
GUILayout.Label("<i>null (" + ValueType + ")</i>", null);
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ namespace Explorer
|
|||||||
|
|
||||||
private bool ShouldProcessMember(CacheObjectBase holder)
|
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;
|
if (!string.IsNullOrEmpty(holder.ReflectionException) && m_hideFailedReflection) return false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user