docs.unity3d.com
    Show / Hide Table of Contents

    Class MaterialUIBlock

    Base implementation of a material GUI block to be disabled in the material inspector.

    Inheritance
    Object
    MaterialUIBlock
    AdvancedOptionsUIBlock
    DecalSortingInputsUIBlock
    DecalSurfaceInputsUIBlock
    DecalSurfaceOptionsUIBlock
    DetailInputsUIBlock
    DistortionUIBlock
    EmissionUIBlock
    LayeringOptionsUIBlock
    LayerListUIBlock
    LayersUIBlock
    LitSurfaceInputsUIBlock
    RefractionUIBlock
    ShaderGraphUIBlock
    SurfaceOptionUIBlock
    TessellationOptionsUIBlock
    TransparencyUIBlock
    UnlitSurfaceInputsUIBlock
    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()
    Back to top
    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