NaughtyAttributes
NaughtyAttributes copied to clipboard
[Request] Colouring variables in the inspector
This is a "nice to have" and I'm not sure if this is possible with other tools, but it'd be great if I could somehow colour variables for the inspector either via rgb or hex values:
public class NaughtyComponent : MonoBehaviour {
[Color("#123456")]
public string thisIsAVariable;
[Color("255,0,102")]
public Vector3 vectorXYZ;
}
would make:
(there's a tool I use that colours the transform values similarly, it colours the field not just the variable's name, but that's also fine)
Thank you for your consideration.
Not exactly related to this issue, but here is one that can co-op with NaughtyAttributes
// work with NaughtyAttributes
[RichLabel("<color=lime><label/>")]
// A little hack to make NaughtyAttributes render an empty label to avoid overlap
[NaughtyAttributes.ResizableTextArea, NaughtyAttributes.Label(" ")]
public string thisIsAVariable;
// work alone
[RichLabel("<color=#ff0066><label/>")]
public Vector3 vectorXYZ;
// work with Unity's built-in attributes
[RichLabel("<color=pink><label/>")]
[Range(0, 1)]
public float range;
@TylerTemp I've not had time to implement this into my project up until now. Thank you for the examples! This is a really great tool you made and I'm glad it works with NaughtyAttributes. I see it does a wide range of things, I am excited to explore it further now that I downloaded it into my project. Thank you again!