docs.unity.cn
    Show / Hide Table of Contents

    Class FullscreenShaderGUI

    The base class to implement the fullscreen Material GUI in a render pipeline.

    Inheritance
    Object
    ShaderGUI
    FullscreenShaderGUI
    Inherited Members
    ShaderGUI.OnMaterialPreviewGUI(MaterialEditor, Rect, GUIStyle)
    UnityEditor.ShaderGUI.OnMaterialInteractivePreviewGUI(UnityEditor.MaterialEditor, UnityEngine.Rect, UnityEngine.GUIStyle)
    ShaderGUI.OnMaterialPreviewSettingsGUI(MaterialEditor)
    ShaderGUI.OnClosed(Material)
    ShaderGUI.FindProperty(String, MaterialProperty[])
    ShaderGUI.FindProperty(String, MaterialProperty[], Boolean)
    Namespace: UnityEditor.Rendering.Fullscreen.ShaderGraph
    Syntax
    public class FullscreenShaderGUI : ShaderGUI

    Methods

    AssignNewShaderToMaterial(Material, Shader, Shader)

    Assign a new FullscreenShader to the target material.

    Declaration
    public override void AssignNewShaderToMaterial(Material material, Shader oldShader, Shader newShader)
    Parameters
    Type Name Description
    Material material

    A valid material using a Fullscreen Shader Graph.

    Shader oldShader
    Shader newShader
    Overrides
    ShaderGUI.AssignNewShaderToMaterial(Material, Shader, Shader)

    DrawSurfaceInputs(Material)

    Draw the Surface Inputs section of the fullscreen shader GUI.

    Declaration
    protected virtual void DrawSurfaceInputs(Material material)
    Parameters
    Type Name Description
    Material material

    A valid material using a Fullscreen Shader Graph.

    DrawSurfaceOptions(Material)

    Draw the Surface Options section of the fullscreen shader GUI.

    Declaration
    protected virtual void DrawSurfaceOptions(Material material)
    Parameters
    Type Name Description
    Material material

    A valid material using a Fullscreen Shader Graph.

    OnGUI(MaterialEditor, MaterialProperty[])

    Unity calls this function when it displays the GUI. To implement your custom GUI, override this function..

    Declaration
    public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
    Parameters
    Type Name Description
    MaterialEditor materialEditor

    Material editor instance.

    MaterialProperty[] properties

    The list of properties in the inspected material(s).

    Overrides
    ShaderGUI.OnGUI(MaterialEditor, MaterialProperty[])

    OnOpenGUI(Material, MaterialEditor, MaterialProperty[])

    Unity calls this function when it displays the GUI. To implement your custom GUI, override this function..

    Declaration
    public virtual void OnOpenGUI(Material material, MaterialEditor materialEditor, MaterialProperty[] properties)
    Parameters
    Type Name Description
    Material material

    The target materials for this GUI.

    MaterialEditor materialEditor

    Material editor instance.

    MaterialProperty[] properties

    The list of properties in the inspected material(s).

    SetupSurface(Material)

    Setup the fullscreen shader keywords from the material properties.

    Declaration
    public static void SetupSurface(Material material)
    Parameters
    Type Name Description
    Material material

    A valid material using a Fullscreen Shader Graph.

    ValidateMaterial(Material)

    Ensures that the material is correctly setup.

    Declaration
    public override void ValidateMaterial(Material material)
    Parameters
    Type Name Description
    Material material

    A valid material using a Fullscreen Shader Graph.

    Overrides
    ShaderGUI.ValidateMaterial(Material)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 07 July 2023