#Why and When are property drawers used?

1 messages · Page 1 of 1 (latest)

white ravine
#

Hey for a class I am in I need to make a custom property drawer for an already existing game. I am not really grasping the idea of a property drawer and to be honest I don't know why I wouldn't just make a custom window or inspector instead so if someone could really dumb down the general idea for me and where in my game I should be looking to implement a property drawer that would be amazing!

lone perch
white ravine
#

thats kinda where idk why but im blanking so like if i have a int i only want to increment in 5's make a drawer?

lone perch
#

For example Vector3 uses a PropertyDrawer and that's why instead of seeing x, y and z on separate lines like you would for a normal struct, you see it all on one line. Quaternion uses one so we see the rotation in Euler angles in the inspector instead of seeing xyzw fields