OnGUI
Draws a custom GUI for the property with a label that can include a tooltip and an icon.
Read time 1 minuteLast updated 21 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
OnGUI(Rect, MaterialProperty, GUIContent, MaterialEditor)
Draws a custom GUI for the property with a label that can include a tooltip and an icon.
public virtual void OnGUI(Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor)
Parameters
Rectangle on the screen to use for the property GUI.
The MaterialProperty to make the custom GUI for.
The label of this property, as a GUIContent.
Current material editor.
Remarks
Override this overload to use the full label content, including its tooltip and icon. By default, it passes only the label text to the overload that takes a string label. If you override neither overload, the drawer shows "No GUI Implemented".
OnGUI(Rect, MaterialProperty, string, MaterialEditor)
Override this method to make your own GUI for the property.
public virtual void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor)
Parameters
Rectangle on the screen to use for the property GUI.
The MaterialProperty to make the custom GUI for.
The label of this property.
Current material editor.