Class MaterialUIBlockList
Wrapper to handle Material UI Blocks, it will handle initialization of the blocks when drawing the GUI.
Implements
Inherited Members
Namespace: UnityEditor.Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Editor.dll
Syntax
public class MaterialUIBlockList : List<MaterialUIBlock>, IList<MaterialUIBlock>, ICollection<MaterialUIBlock>, IReadOnlyList<MaterialUIBlock>, IReadOnlyCollection<MaterialUIBlock>, IEnumerable<MaterialUIBlock>, IList, ICollection, IEnumerable
Constructors
MaterialUIBlockList()
Construct a ui block list
Declaration
public MaterialUIBlockList()
MaterialUIBlockList(MaterialUIBlockList)
Construct a sub ui block list by passing the parent ui block list (useful for layered UI where ui blocks are nested)
Declaration
public MaterialUIBlockList(MaterialUIBlockList parent)
Parameters
Type | Name | Description |
---|---|---|
MaterialUIBlockList | parent |
Fields
parent
Parent of the ui block list, in case of nesting (Layered Lit material)
Declaration
public MaterialUIBlockList parent
Field Value
Type | Description |
---|---|
MaterialUIBlockList |
Properties
materials
List of materials currently selected in the inspector
Declaration
public Material[] materials { get; }
Property Value
Type | Description |
---|---|
Material[] |
Methods
FetchUIBlock<T>()
Fetch the first ui block of type T in the current list of material blocks
Declaration
public T FetchUIBlock<T>() where T : MaterialUIBlock
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | MaterialUIBlock type |
Initialize(MaterialEditor, MaterialProperty[])
Initialize the ui blocks
Declaration
public void Initialize(MaterialEditor materialEditor, MaterialProperty[] properties)
Parameters
Type | Name | Description |
---|---|---|
MaterialEditor | materialEditor | Material editor instance. |
MaterialProperty[] | properties | The list of properties in the inspected material(s). |
OnGUI(MaterialEditor, MaterialProperty[])
Render the list of ui blocks
Declaration
public void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
Parameters
Type | Name | Description |
---|---|---|
MaterialEditor | materialEditor | |
MaterialProperty[] | properties |