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.
Inherited Members
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
OnGUIOpen()
Renders the properties in the block.
Declaration
protected override void OnGUIOpen()
Overrides
PropertiesDefaultGUI(MaterialProperty[])
Draws the material properties.
Declaration
protected void PropertiesDefaultGUI(MaterialProperty[] properties)
Parameters
Type | Name | Description |
---|---|---|
MaterialProperty[] | properties | List of Material Properties to draw |