Another reason why you might want to add property drawers is, take a look at this situation:
1
2
3
4
5
6
7
8
[Serializable]
publicclassEyes
{
publicBBFloat fov,distance;
// etc...
}
Now put a reference to an Eye in a Task, the Eye would be drawn OK just like any other serializable class with a foldout and all, but if you collapse it to see how fov and distance are drawn, they’re not gonna be drawn the way you want them – they’ll also be drawn with a foldout that if you collapse you’ll get ‘value’ and all the rest of the stuff that’s in a BBVaraible…
This problem is avoided if you’d used a PropertyDrawer to draw your BBVariable stuff.
– TP
Login
Register
By registering on this website you agree to our Privacy Policy.