Class GraphUtil | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class GraphUtil

    Inheritance
    System.Object
    GraphUtil
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: UnityEditor.ShaderGraph
    Syntax
    public static class GraphUtil

    Methods

    GenerateApplicationVertexInputs(ShaderGraphRequirements, ShaderStringBuilder)

    Declaration
    public static void GenerateApplicationVertexInputs(ShaderGraphRequirements graphRequiements, ShaderStringBuilder vertexInputs)
    Parameters
    Type Name Description
    ShaderGraphRequirements graphRequiements
    ShaderStringBuilder vertexInputs

    GenerateSurfaceDescriptionFunction(List<INode>, AbstractMaterialNode, AbstractMaterialGraph, ShaderStringBuilder, FunctionRegistry, PropertyCollector, ShaderGraphRequirements, GenerationMode, String, String, Vector1ShaderProperty, IEnumerable<MaterialSlot>, String)

    Declaration
    public static void GenerateSurfaceDescriptionFunction(List<INode> activeNodeList, AbstractMaterialNode masterNode, AbstractMaterialGraph graph, ShaderStringBuilder surfaceDescriptionFunction, FunctionRegistry functionRegistry, PropertyCollector shaderProperties, ShaderGraphRequirements requirements, GenerationMode mode, string functionName = "PopulateSurfaceData", string surfaceDescriptionName = "SurfaceDescription", Vector1ShaderProperty outputIdProperty = null, IEnumerable<MaterialSlot> slots = null, string graphInputStructName = "SurfaceDescriptionInputs")
    Parameters
    Type Name Description
    List<INode> activeNodeList
    AbstractMaterialNode masterNode
    AbstractMaterialGraph graph
    ShaderStringBuilder surfaceDescriptionFunction
    FunctionRegistry functionRegistry
    PropertyCollector shaderProperties
    ShaderGraphRequirements requirements
    GenerationMode mode
    System.String functionName
    System.String surfaceDescriptionName
    Vector1ShaderProperty outputIdProperty
    IEnumerable<MaterialSlot> slots
    System.String graphInputStructName

    GenerateSurfaceDescriptionStruct(ShaderStringBuilder, List<MaterialSlot>, Boolean, String, HashSet<String>)

    Declaration
    public static void GenerateSurfaceDescriptionStruct(ShaderStringBuilder surfaceDescriptionStruct, List<MaterialSlot> slots, bool isMaster, string structName = "SurfaceDescription", HashSet<string> activeFields = null)
    Parameters
    Type Name Description
    ShaderStringBuilder surfaceDescriptionStruct
    List<MaterialSlot> slots
    System.Boolean isMaster
    System.String structName
    HashSet<System.String> activeFields

    GenerateVertexDescriptionFunction(AbstractMaterialGraph, ShaderStringBuilder, FunctionRegistry, PropertyCollector, GenerationMode, List<INode>, List<MaterialSlot>, String, String, String)

    Declaration
    public static void GenerateVertexDescriptionFunction(AbstractMaterialGraph graph, ShaderStringBuilder builder, FunctionRegistry functionRegistry, PropertyCollector shaderProperties, GenerationMode mode, List<INode> nodes, List<MaterialSlot> slots, string graphInputStructName = "VertexDescriptionInputs", string functionName = "PopulateVertexData", string graphOutputStructName = "VertexDescription")
    Parameters
    Type Name Description
    AbstractMaterialGraph graph
    ShaderStringBuilder builder
    FunctionRegistry functionRegistry
    PropertyCollector shaderProperties
    GenerationMode mode
    List<INode> nodes
    List<MaterialSlot> slots
    System.String graphInputStructName
    System.String functionName
    System.String graphOutputStructName

    GenerateVertexDescriptionStruct(ShaderStringBuilder, List<MaterialSlot>, String, HashSet<String>)

    Declaration
    public static void GenerateVertexDescriptionStruct(ShaderStringBuilder builder, List<MaterialSlot> slots, string structName = "VertexDescription", HashSet<string> activeFields = null)
    Parameters
    Type Name Description
    ShaderStringBuilder builder
    List<MaterialSlot> slots
    System.String structName
    HashSet<System.String> activeFields

    GetLegacyTypeRemapping()

    Declaration
    public static Dictionary<SerializationHelper.TypeSerializationInfo, SerializationHelper.TypeSerializationInfo> GetLegacyTypeRemapping()
    Returns
    Type Description
    Dictionary<SerializationHelper.TypeSerializationInfo, SerializationHelper.TypeSerializationInfo>

    GetPreviewShader(AbstractMaterialGraph, AbstractMaterialNode)

    Declaration
    public static GenerationResults GetPreviewShader(this AbstractMaterialGraph graph, AbstractMaterialNode node)
    Parameters
    Type Name Description
    AbstractMaterialGraph graph
    AbstractMaterialNode node
    Returns
    Type Description
    GenerationResults

    GetShader(AbstractMaterialGraph, AbstractMaterialNode, GenerationMode, String)

    Declaration
    public static GenerationResults GetShader(this AbstractMaterialGraph graph, AbstractMaterialNode node, GenerationMode mode, string name)
    Parameters
    Type Name Description
    AbstractMaterialGraph graph
    AbstractMaterialNode node
    GenerationMode mode
    System.String name
    Returns
    Type Description
    GenerationResults

    GetUberColorShader(AbstractMaterialGraph)

    Declaration
    public static GenerationResults GetUberColorShader(this AbstractMaterialGraph graph)
    Parameters
    Type Name Description
    AbstractMaterialGraph graph
    Returns
    Type Description
    GenerationResults

    OpenFile(String)

    Declaration
    public static void OpenFile(string path)
    Parameters
    Type Name Description
    System.String path

    WriteToFile(String, String)

    Declaration
    public static bool WriteToFile(string path, string content)
    Parameters
    Type Name Description
    System.String path
    System.String content
    Returns
    Type Description
    System.Boolean
    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