| Parameter | Description |
|---|---|
| property | The material property that the GUI control edits. |
Starts a property wrapper for a GUI control that edits a material property, using automatic layout.
MaterialEditor has methods that draw specific material properties, such as MaterialEditor.ShaderProperty and MaterialEditor.TextureProperty. If you draw a property with another GUI control instead, such as EditorGUI.Toggle, wrap the control in a property wrapper to get the standard behavior. The wrapper shows material variant overrides in bold, adds the Apply and Revert options to the context menu, disables the control for locked properties, and handles editing multiple different values. End the wrapper with MaterialEditor.EndProperty. This overload doesn't take a rectangle, so the Unity Editor uses GUILayoutUtility.GetLastRect at the end of the wrapper to find the position of the control.
| Parameter | Description |
|---|---|
| rect | The position and size of the GUI control, including any label. |
| property | The material property that the GUI control edits. |
Starts a property wrapper for a GUI control that edits a material property, at a specified position.
MaterialEditor has methods that draw specific material properties, such as MaterialEditor.ShaderProperty and MaterialEditor.TextureProperty. If you draw a property with another GUI control instead, such as EditorGUI.Toggle, wrap the control in a property wrapper to get the standard behavior. The wrapper shows material variant overrides in bold, adds the Apply and Revert options to the context menu, disables the control for locked properties, and handles editing multiple different values. End the wrapper with MaterialEditor.EndProperty.
| Parameter | Description |
|---|---|
| property | The serialized property for the material setting that the GUI control edits. |
Starts a property wrapper for a GUI control that edits a serialized material setting, using automatic layout.
MaterialEditor has methods that draw specific material properties, such as MaterialEditor.ShaderProperty and MaterialEditor.TextureProperty. If you draw a property with another GUI control instead, such as EditorGUI.Toggle, wrap the control in a property wrapper to get the standard behavior. The wrapper shows material variant overrides in bold, adds the Apply and Revert options to the context menu, disables the control for locked properties, and handles editing multiple different values. End the wrapper with MaterialEditor.EndProperty. Use this overload when you draw a control for Material.renderQueue, Material.doubleSidedGI, Material.enableInstancing, or Material.globalIlluminationFlags, and pass the matching SerializedProperty. This overload doesn't take a rectangle, so the Unity Editor uses GUILayoutUtility.GetLastRect at the end of the wrapper to find the position of the control.
| Parameter | Description |
|---|---|
| rect | The position and size of the GUI control, including any label. |
| property | The serialized property for the material setting that the GUI control edits. |
Starts a property wrapper for a GUI control that edits a serialized material setting, at a specified position.
MaterialEditor has methods that draw specific material properties, such as MaterialEditor.ShaderProperty and MaterialEditor.TextureProperty. If you draw a property with another GUI control instead, such as EditorGUI.Toggle, wrap the control in a property wrapper to get the standard behavior. The wrapper shows material variant overrides in bold, adds the Apply and Revert options to the context menu, disables the control for locked properties, and handles editing multiple different values. End the wrapper with MaterialEditor.EndProperty. Use this overload when you draw a control for Material.renderQueue, Material.doubleSidedGI, Material.enableInstancing, or Material.globalIlluminationFlags, and pass the matching SerializedProperty.