Custom EditorWindow indicator
I am looking for a GUI indicator, like an LED on/off that can be used in an EditorWindow. I have been trying to change the background color of the checkbox area of an EditorGUILayout.Toggle and have had no luck.
Any ideas how I can create an indicator on my custom EditorWindow? Something that is read-only and preferable nicer than a checked or unchecked checkbox.
@$$anonymous$$rellumdaed
Not sure exactly what you are trying to do - image might help. So I'm just guessing...
Use a texture in GUILayout? Then change it along some field state.
https://docs.unity3d.com/ScriptReference/GUILayout.Label.html
https://docs.unity3d.com/ScriptReference/GUI.DrawTexture.html
From what I can tell those work on regular game objects but not EditorWindow GUI elements.
I can put a mock together I just want an EditorWindow I can open from a custom editor menu item that will have some 'lights' on it that show if certain build defines are set or not. That way I don't have to open build settings and finding/reading the right field to see if the #define is there.
$$anonymous$$aybe the references you give work for EditorGUILayout items but I am not getting it to work. $$anonymous$$aybe I am approaching it wrong?
Here is a photoshop mockup of what I am trying to get:
The checkboxes with checks in them work. But it is not as pretty and I also have not yet got them disabled so they are read-only, working on that now.
@$$anonymous$$rellumdaed - your sketch is not attached properly - can't see it.
"From what I can tell those work on regular game objects but not EditorWindow GUI elements."
AFAI$$anonymous$$ GuiLayout works with custom editor windows etc, even though there is also specialized EditorGUILayout too: https://youtu.be/0$$anonymous$$TaQRS5UwQ
Ah, ok. So if all the GUI stuff works for EditorWindow I must be doing it wrong somehow. Thanks for the video I will review and give it another try. Thanks!