docs.unity3d.com
    Show / Hide Table of Contents

    Class MaterialUIBlockList

    Wrapper to handle Material UI Blocks, it will handle initialization of the blocks when drawing the GUI.

    Inheritance
    Object
    List<MaterialUIBlock>
    MaterialUIBlockList
    Namespace: UnityEditor.Rendering.HighDefinition
    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 This function is called automatically by MaterialUIBlockList.OnGUI so you only need this when you want to render the UI Blocks in a custom order

    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
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023