Class MaterialUIBlock
Base implementation of a material GUI block to be disabled in the material inspector.
Namespace: UnityEditor.Rendering.HighDefinition
Syntax
public abstract class MaterialUIBlock
Fields
materialEditor
The current material editor.
Declaration
protected MaterialEditor materialEditor
Field Value
| Type | Description |
|---|---|
| MaterialEditor |
materials
The list of selected materials to edit.
Declaration
protected Material[] materials
Field Value
| Type | Description |
|---|---|
| Material[] |
parent
Parent of the UI block.
Declaration
protected MaterialUIBlockList parent
Field Value
| Type | Description |
|---|---|
| MaterialUIBlockList |
properties
The list of available properties in the selected materials.
Declaration
protected MaterialProperty[] properties
Field Value
| Type | Description |
|---|---|
| MaterialProperty[] |
Methods
FindProperty(String, Boolean)
Find a material property in the list of available properties.
Declaration
protected MaterialProperty FindProperty(string propertyName, bool isMandatory = false)
Parameters
| Type | Name | Description |
|---|---|---|
| String | propertyName | Name of the property. |
| Boolean | isMandatory | Specifies whether the property is mandatory for your Inspector. |
Returns
| Type | Description |
|---|---|
| MaterialProperty | Returns the material property if it exists. Returns null otherwise. |
FindPropertyLayered(String, Int32, Boolean)
Find a material property with layering option
Declaration
protected MaterialProperty[] FindPropertyLayered(string propertyName, int layerCount, bool isMandatory = false)
Parameters
| Type | Name | Description |
|---|---|---|
| String | propertyName | Name of the property. |
| Int32 | layerCount | Number of layers of the shader. |
| Boolean | isMandatory | Specifies whether the property is mandatory for your Inspector. |
Returns
| Type | Description |
|---|---|
| MaterialProperty[] | Returns the material property if it exists. Returns null otherwise. |
LoadMaterialProperties()
Loads the material properties for the block.
Declaration
public abstract void LoadMaterialProperties()
OnGUI()
Renders the properties in the block.
Declaration
public abstract void OnGUI()