docs.unity3d.com
    Show / Hide Table of Contents

    Class ShaderGraphUIBlock

    The UI block that represents Shader Graph material properties. This UI block displays every non-hidden property inside a shader. You can also use this with non-shadergraph shaders.

    Inheritance
    Object
    MaterialUIBlock
    ShaderGraphUIBlock
    Inherited Members
    MaterialUIBlock.expandableBit
    MaterialUIBlock.header
    MaterialUIBlock.materialEditor
    MaterialUIBlock.materials
    MaterialUIBlock.properties
    MaterialUIBlock.parent
    MaterialUIBlock.FindProperty(String, Boolean)
    MaterialUIBlock.FindPropertyLayered(String, Int32, Boolean)
    MaterialUIBlock.OnGUI()
    MaterialUIBlock.isSubHeader
    MaterialUIBlock.showSection
    Namespace: UnityEditor.Rendering.HighDefinition
    Syntax
    public class ShaderGraphUIBlock : MaterialUIBlock

    Constructors

    ShaderGraphUIBlock(MaterialUIBlock.ExpandableBit, ShaderGraphUIBlock.Features)

    Constructs a ShaderGraphUIBlock based on the parameters.

    Declaration
    public ShaderGraphUIBlock(MaterialUIBlock.ExpandableBit expandableBit = MaterialUIBlock.ExpandableBit.ShaderGraph, ShaderGraphUIBlock.Features features = ShaderGraphUIBlock.Features.All)
    Parameters
    Type Name Description
    MaterialUIBlock.ExpandableBit expandableBit

    Bit index used to store the foldout state.

    ShaderGraphUIBlock.Features features

    Features enabled in the block.

    Methods

    DrawDiffusionProfileUI()

    Draw the built-in exposed Diffusion Profile when a material uses sub-surface scattering or transmission.

    Declaration
    protected void DrawDiffusionProfileUI()

    DrawShadowMatteToggle()

    Draws the Shadow Matte settings. This is only available for Unlit materials.

    Declaration
    protected void DrawShadowMatteToggle()

    LoadMaterialProperties()

    Loads the material properties for the block.

    Declaration
    public override void LoadMaterialProperties()
    Overrides
    MaterialUIBlock.LoadMaterialProperties()

    OnGUIOpen()

    Renders the properties in the block.

    Declaration
    protected override void OnGUIOpen()
    Overrides
    MaterialUIBlock.OnGUIOpen()

    PropertiesDefaultGUI(MaterialProperty[])

    Draws the material properties.

    Declaration
    protected void PropertiesDefaultGUI(MaterialProperty[] properties)
    Parameters
    Type Name Description
    MaterialProperty[] properties

    List of Material Properties to draw

    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