This is one of the things you think you won’t do because you’ll never need it, but creating a small tool to generate meshes to make waterfalls, made me need to display only the X value of a Vector3 in the Inspector, and the only way to do it was to create a custom Property Attribute.
The complexity of creating them depends on what you want to display in the inspector and what function you want it to do.
First of all, you must have in Assets a folder called Editor, and this is very important, because if you do not put the code in this folder, it will not work.
(más…)