[ Web Proxy ]
URL:
Viewing: https://docs.unity3d.com/ScriptReference/Unity.GraphToolkit.Editor.IConstantNode.html [Back]  [Original]

Unity - Scripting API: IConstantNode
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    IConstantNode

    interface in Unity.GraphToolkit.Editor


    Implements interfaces:INode

    Suggest a change

    Success!

    Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

    Close

    Submission failed

    For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

    Close
    Your name Your email Suggestion* Submit suggestion

    Cancel

    Description

    Interface for a specialized node that outputs a fixed value of a specific data type.

    Use constant nodes to represent a static, predefined value in the graph. This value remains unchanged and is typically used to feed constant input into computations. To retrieve the value, use IConstantNode.TryGetValue. This method is type-safe and provides access to the nodes value if the type matches. The IConstantNode.DataType property identifies the constant's type.

    Properties

    Property Description
    DataType The data type of the constant node's value.

    Public Methods

    Method Description
    TryGetValue Retrieves the value of the constant node as the specified type.
    TrySetValue Sets the value of the constant node to the specified value of type T.

    Web Proxy Viewer  |  New URL  |  Original Page