I have a custom parameter drawer with a few types. Is it possible to change text color or background color for a field in the inspector?
Let say I have:
public bool one;
public bool two;
public bool three;
and I want to display ‘two’ in unique color.
Is it possible?
Thank you
Yury
To customize appearance of your script variables in the inspector, you should have an Editor script.
That essentially means your script class extends Editor
and is placed within the Editor
directory.
For color, you’ll want to edit the GUIStyleState of the GUIStyle option for EditorGUILayout.Toggle
Here’s a video to get started: https://unity3d.com/learn/tutorials/modules/intermediate/editor/building-custom-inspector