@@ -40,7 +40,8 @@ public override void UpdateValue(object obj)
40
40
}
41
41
else
42
42
{
43
- var cast = ReflectionHelpers . Il2CppCast ( obj , declaringType ) ;
43
+ //var cast = ReflectionHelpers.Il2CppCast(obj, declaringType);
44
+ var cast = obj . Il2CppCast ( declaringType ) ;
44
45
m_value = this . propInfo . GetValue ( this . propInfo . GetAccessors ( ) [ 0 ] . IsStatic ? null : cast , null ) ;
45
46
}
46
47
}
@@ -49,19 +50,19 @@ public override void UpdateValue(object obj)
49
50
m_value = this . propInfo . GetValue ( obj , null ) ;
50
51
}
51
52
}
52
- catch ( Exception e )
53
+ catch // (Exception e)
53
54
{
54
- MelonLogger . Log ( "Exception on PropertyInfoHolder.UpdateValue, Name: " + this . propInfo . Name ) ;
55
- MelonLogger . Log ( e . GetType ( ) + ", " + e . Message ) ;
55
+ // MelonLogger.Log("Exception on PropertyInfoHolder.UpdateValue, Name: " + this.propInfo.Name);
56
+ // MelonLogger.Log(e.GetType() + ", " + e.Message);
56
57
57
- var inner = e . InnerException ;
58
- while ( inner != null )
59
- {
60
- MelonLogger . Log ( "inner: " + inner . GetType ( ) + ", " + inner . Message ) ;
61
- inner = inner . InnerException ;
62
- }
58
+ // var inner = e.InnerException;
59
+ // while (inner != null)
60
+ // {
61
+ // MelonLogger.Log("inner: " + inner.GetType() + ", " + inner.Message);
62
+ // inner = inner.InnerException;
63
+ // }
63
64
64
- m_value = null ;
65
+ // m_value = null;
65
66
}
66
67
}
67
68
@@ -113,9 +114,7 @@ public override void SetValue(object obj)
113
114
}
114
115
}
115
116
116
- var declaring = propInfo . DeclaringType ;
117
- var cast = ReflectionHelpers . Il2CppCast ( obj , declaring ) ;
118
-
117
+ var cast = obj . Il2CppCast ( propInfo . DeclaringType ) ;
119
118
propInfo . SetValue ( propInfo . GetAccessors ( ) [ 0 ] . IsStatic ? null : cast , m_value , null ) ;
120
119
}
121
120
catch
0 commit comments