- Home /
Editor GUI TEXT On Inspector: How to add header text note in the inspector using a Custom Editor Inspector script ?
Using [Header] is possible to add text into the inspector on a regular script. But I'm using a CustomEditor script inside the editor folder. I'm a beginner making editor scripts. Is there a function similar to "Header" that I can use inside OnInspectorGUI ?
as for example EditorGUILayout.Space(); EditorGUI.Header("Info text note "); ??
or a workaround?
Answer by FortisVenaliter · Aug 25, 2017 at 02:48 PM
I believe the function you're looking for is EditorGUILayout.LabelField();
Yes, @FortisVenaliter ! using:
EditorGUILayout.LabelField( "TITLE: ", "info note in inspector");
inside OnInspectorGUI() it is possible to add text. Also, there is a function to make a message
EditorGUILayout.HelpBox("This is a square message info in inspector", $$anonymous$$essageType.Info);
The result in inspector will be:
Your answer
Follow this Question
Related Questions
Using a CustomEditor in the inspector and also seeing normal inspector fields 1 Answer
Setting custom amount of space between elements in a custom inspector with EditorGUILayout ? 1 Answer
Is it possible to store and display EditorGUILayout.Toggles? 0 Answers
OnSceneGUI render projection onto object surface 1 Answer
Custom Inspector and ExposedRefreces 1 Answer