mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-29 03:12:26 +08:00
1.3.2 cleanup
- cleanup - fixed a mistake with FieldInfos on reflection window, causing all values to be null. - improved displaying of generic objects (now shows object Type after the name)
This commit is contained in:
@ -33,6 +33,7 @@ namespace Explorer
|
||||
if (obj is Il2CppSystem.Object ilObject)
|
||||
{
|
||||
var declaringType = this.propInfo.DeclaringType;
|
||||
|
||||
if (declaringType == typeof(Il2CppObjectBase))
|
||||
{
|
||||
m_value = ilObject.Pointer;
|
||||
@ -40,7 +41,7 @@ namespace Explorer
|
||||
else
|
||||
{
|
||||
var cast = CppExplorer.Il2CppCast(obj, declaringType);
|
||||
m_value = this.propInfo.GetValue(cast, null);
|
||||
m_value = this.propInfo.GetValue(this.propInfo.GetAccessors()[0].IsStatic ? null : cast, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -70,7 +71,7 @@ namespace Explorer
|
||||
{
|
||||
if (propInfo.PropertyType.IsEnum)
|
||||
{
|
||||
if (System.Enum.Parse(propInfo.PropertyType, m_value.ToString()) is object enumValue && enumValue != null)
|
||||
if (Enum.Parse(propInfo.PropertyType, m_value.ToString()) is object enumValue && enumValue != null)
|
||||
{
|
||||
m_value = enumValue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user