If you are writing UI code and you want the controls you are drawing to appear as if they are labels until they are in focus you can use the EditorGUIUtility.LookLikeInspector & EditorGUIUtility.LookLikeControls methods.
public class LookLikeControlsInspector : EditorWindow
{
private int integer1;
float float1 = 5.5f;
[MenuItem("Examples/Look Like Controls - Inspector")]
static void Init()
{
var window = GetWindow<LookLikeControlsInspector>();
window.Show();
}
void OnGUI()
{
EditorGUIUtility.LookLikeInspector();
EditorGUILayout.TextField("Text Field:", "Hello There");
EditorGUILayout.IntField("Int Field:", integer1);
EditorGUILayout.FloatField("Float Field:", float1);
EditorGUILayout.Space();
EditorGUIUtility.LookLikeControls();
EditorGUILayout.TextField("Text Field", "Hello There");
EditorGUILayout.IntField("Int Field:", integer1);
EditorGUILayout.FloatField("Float Field:", float1);
}
}