Created
February 12, 2015 07:59
-
-
Save fuqunaga/c04e75c28f12ae39b129 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Type GetPropertyType(SerializedProperty property) | |
{ | |
var paths = property.propertyPath.Split('.'); | |
var target = property.serializedObject.targetObject as object; | |
return paths.Aggregate(target, (t, path) => t.GetType().GetField(path).GetValue(t)).GetType(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment