C# Class UnityEditor.MaterialPropertyDrawer

Base class to derive custom material property drawers from.

显示文件 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
Apply ( MaterialProperty prop ) : void

Apply extra initial values to the material.

GetPropertyHeight ( MaterialProperty prop, string label, MaterialEditor editor ) : float

Override this method to specify how tall the GUI for this property is in pixels.

OnGUI ( Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor ) : void
OnGUI ( Rect position, MaterialProperty prop, string label, MaterialEditor editor ) : void

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

Protected Methods

Method Description
MaterialPropertyDrawer ( ) : System

Method Details

Apply() public method

Apply extra initial values to the material.

public Apply ( MaterialProperty prop ) : void
prop MaterialProperty The MaterialProperty to apply values for.
return void

GetPropertyHeight() public method

Override this method to specify how tall the GUI for this property is in pixels.

public GetPropertyHeight ( MaterialProperty prop, string label, MaterialEditor editor ) : float
prop MaterialProperty The MaterialProperty to make the custom GUI for.
label string The label of this property.
editor MaterialEditor Current material editor.
return float

MaterialPropertyDrawer() protected method

protected MaterialPropertyDrawer ( ) : System
return System

OnGUI() public method

public OnGUI ( Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor ) : void
position UnityEngine.Rect
prop MaterialProperty
label UnityEngine.GUIContent
editor MaterialEditor
return void

OnGUI() public method

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

public OnGUI ( Rect position, MaterialProperty prop, string label, MaterialEditor editor ) : void
position UnityEngine.Rect Rectangle on the screen to use for the property GUI.
prop MaterialProperty The MaterialProperty to make the custom GUI for.
label string The label of this property.
editor MaterialEditor Current material editor.
return void