Editor API responsible for highlighting fields in blue when selected?

Hi all,

whenever you click on an object/string/int field it gets highlighted with blue (the label text and the bounds of the field rectangle). What is the editor API responsible for this? I’ve been ILSpying on UnityEditor.dll, I looked at the internal DoObjectField for example, but couldn’t really find anything about ‘blue’ or ‘highlight’ or, style or, I don’t know… Does anyone know? perhaps someone from the editor team can help?

Much appreciated, thanks!

Its just a gui element that is getting another background when focused.
You can use this to see the EditorStyle that is responsible for that.

public GUIStyle myGuiStyle;
    void Start () {
        myGuiStyle = UnityEditor.EditorStyles.objectField;
    }

http://docs.unity3d.com/ScriptReference/EditorStyles.html

Well that’s the style that I’m using right now but I’m not getting the blue background on focus (It’s a GUI.Label using EditorStyle.objectField)