Having the usual code, I try to override the drawing component.

[CustomEditor(typeof(UDebugBox))] public class UDebugBoxEditor : Editor { public override void OnInspectorGUI() { EditorGUILayout.LabelField(new GUIContent("Text","Tooltip"), GUILayout.Width(300)); } } 

Problem : Tooltip is not visible when hovering over this label during Play

Question : how to fix it?

  • I checked your code on myself - everything works. - RiotBr3aker
  • @ RiotBr3aker What version of unit do you have? .NET what? - Arantler
  • 2018.2.2f1, .NET 3.5. - RiotBr3aker
  • @ RiotBr3aker and during the launch of the application (if you press the Play button in the editor) does the prompt appear? - Arantler
  • one
    No, in the play mode does not work, and should not in theory. And why do you need tooltips during runtime? - RiotBr3aker

1 answer 1

This is the mechanics of Unity. In the Play inspector, prompts for the fields will not be displayed only if Play is not running or is set to Pause.

Therefore, either use crutches or look for another way to accomplish your task.