docs.unity3d.com
    Show / Hide Table of Contents

    Use relations to debug

    Relations are a useful tool to understand the dependencies between each port of a node. For example, to get the result of A + B with the Add node, you need to provide a value for A and B. Likewise, before invoking the Log node, you should provide a value for its Message input port.

    Visual scripting uses this information in the background for Predictive Debugging. For example, if you tried to get the value of A + B without providing a value for A, the node would show up as orange to indicate that it fails in play mode.

    When that happens, you can use the warnings shown in the Graph Inspector to know what is missing.

    Relations can also help understand the ports that are required and which ports are optional. For example, in the Get Child node (under fuzzy finder Codebase > Unity Engine > Transform), there is no need to connect the control ports if the goal is to get the transform value output.

    Enable the Relations toggle in the toolbar for the inner connections of each node to be displayed.

    Note

    You cannot edit relations. They are predefined for each type of node.

    Back to top
    Terms of use
    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