docs.unity3d.com
Search Results for

    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
    FogVolumeUIBlock
    LayerListUIBlock
    LayeringOptionsUIBlock
    LayersUIBlock
    LitSurfaceInputsUIBlock
    RefractionUIBlock
    ShaderGraphUIBlock
    SixWayUIBlock
    SurfaceOptionUIBlock
    TessellationOptionsUIBlock
    TransparencyUIBlock
    UnlitSurfaceInputsUIBlock
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Editor.dll
    Syntax
    public abstract class MaterialUIBlock

    Constructors

    MaterialUIBlock()

    Default Constructor, you must override the method OnGUI

    Declaration
    protected 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[]

    Properties

    expandableBit

    The MaterialUIBlock.ExpandableBit to store the state of the block

    Declaration
    public MaterialUIBlock.ExpandableBit expandableBit { get; }
    Property Value
    Type Description
    MaterialUIBlock.ExpandableBit

    header

    The GUIContent used as header of the block

    Declaration
    public GUIContent header { get; }
    Property Value
    Type Description
    GUIContent

    isSubHeader

    Property that specifies if the scope is a subheader

    Declaration
    protected virtual bool isSubHeader { get; }
    Property Value
    Type Description
    bool

    showSection

    If the section should be shown

    Declaration
    protected virtual bool showSection { get; }
    Property Value
    Type Description
    bool

    Methods

    FindProperty(string, bool)

    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.

    bool 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, int, bool)

    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.

    int layerCount

    Number of layers of the shader.

    bool 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 virtual void OnGUI()

    OnGUIOpen()

    GUI callback when the header is open

    Declaration
    protected virtual void OnGUIOpen()
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)