Unity graph tool solution based on different implementation now focused on Unity.Experimental.Graphview
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
618 B

using UnityEditor;
namespace TNodeCore.Extensions{
public static class SerializedPropertyExtensions{
public static object BoxedValue(this SerializedProperty serializedProperty){
var targetObject = serializedProperty.serializedObject.targetObject;
var targetObjectClassType = targetObject.GetType();
var field = targetObjectClassType.GetField(serializedProperty.propertyPath);
if (field != null)
{
var value = field.GetValue(targetObject);
return value;
}
return null;
}
}
}