- Home /
Question by
unity_c3Z8hg6NHcx8OA · Dec 01, 2019 at 02:37 AM ·
editorgui
Background color of editorGUI PropertyField
So, I have this field for int in my Custom Property Drawer
EditorGUI.PropertyField(newPosition, row.GetArrayElementAtIndex(j), GUIContent.none);
What I need is for it to tint red, someway, when the value is 1 and green when 2. But I can´t figure out how to change background color, or even how to read current value.
What I tried so far: Placing a ColorField just above with the intended value, but it prevents me from editing the integer...
EditorGUI.ColorField(newPosition, GUIContent.none, new Color(255,0,0,80), false,false,false );
Thanks in advance! I don´t know if this is even possible... Hope so!
Comment