Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

OnGUI(position: Rect, prop: MaterialProperty, label: string, editor: MaterialEditor): void;
void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor);
def OnGUI(position as Rect, prop as MaterialProperty, label as string, editor as MaterialEditor) as void

Parameters

positionRectangle on the screen to use for the property GUI.
propThe MaterialProperty to make the custom GUI for.
labelThe label of this property.
editorCurrent material editor.

Description

Override this method to make your own GUI for the property.