Skip to content

Commit

Permalink
Merge pull request #29 from AnnulusGames/fix-getfieldinfo
Browse files Browse the repository at this point in the history
Fix: SerializedProperty.GetFieldInfo() does not retrieve inherited members
  • Loading branch information
AnnulusGames authored Feb 17, 2024
2 parents d879978 + f9bb3ef commit 787d4b7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static FieldInfo GetFieldInfo(this SerializedProperty property)
object target = property.serializedObject.targetObject;
var splits = property.propertyPath.Split('.');

var fieldInfo = ReflectionHelper.GetField(target.GetType(), splits[0]);
var fieldInfo = ReflectionHelper.GetField(target.GetType(), splits[0], includingBaseNonPublic: true);
target = fieldInfo.GetValue(target);

for (var i = 1; i < splits.Length; i++)
Expand Down

0 comments on commit 787d4b7

Please # to comment.