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

    Description

    When using CodeFunctionNode you are able to define Ports of any type available in Shader Graph. For a full list of available types see Data Types. Defining Ports using CodeFunctionNode requires using specific types when defining a port via a method argument.

    For more information on how to create Nodes using CodeFunctionNode see Custom Nodes with CodeFunctionNode.

    Below is a full list including the Data Type they map to.

    Port Types

    Argument Type Data Type
    Boolean Boolean
    Vector1 Vector1
    Vector2 Vector2
    Vector3 Vector3
    Vector4 Vector4
    Color Vector4 (with a ColorRGBA Port Binding)
    ColorRGBA Vector4 (with a ColorRGBA Port Binding)
    ColorRGB Vector3 (with a ColorRGB Port Binding)
    Texture2D Texture2D
    Texture2DArray Texture2DArray
    Texture3D Texture3D
    Cubemap Cubemap
    SamplerState SamplerState
    DynamicDimensionVector DynamicVector
    Matrix4x4 Matrix4
    Matrix3x3 Matrix3
    Matrix2x2 Matrix2
    DynamicDimensionMatrix DynamicMatrix
    In This Article
    • Description
    • Port Types
    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