Skip to main content

CE GraphBridge

CE.GraphBridge exposes C# methods and properties to graph tooling via attributes and editor generators.

Quick Start

using UdonSharp.CE.GraphBridge;
using UnityEngine;

public static class MathNodes
{
[GraphNode("Math/Lerp Vector3")]
public static Vector3 LerpVector3(
[GraphInput("Start")] Vector3 a,
[GraphInput("End")] Vector3 b,
[GraphInput("T")] float t)
{
return Vector3.Lerp(a, b, t);
}
}

Run the generator from the Unity menu: Udon CE/Graph Bridge/Generate Nodes.

API Reference

Node Attributes

AttributeDescription
GraphNodeExpose a method as a node.
GraphInputCustomize input ports and defaults.
GraphOutputCustomize output ports for out parameters.
GraphFlowOutputDefine flow outputs for branching nodes.
GraphPropertyExpose properties as Get/Set nodes.
GraphEventExpose methods as graph events.
GraphCategoryGroup node classes under a menu category.
GraphTypeConstraintRestrict generic parameter types.

Editor Tools

Menu PathPurpose
Udon CE/Graph Bridge/Node BrowserExplore generated nodes.
Udon CE/Graph Bridge/Validate NodesValidate node definitions.
Udon CE/Graph Bridge/Generate NodesGenerate node assets.
Udon CE/Graph Bridge/Generate WrappersGenerate wrappers for graph access.
Udon CE/Graph Bridge/Generate DocumentationGenerate graph node docs.

Common Pitfalls

Bad

[GraphNode("Math/Hidden")]
private static float Hidden(float v) { return v; } // Private methods are not exported

Good

[GraphNode("Math/Visible")]
public static float Visible(float v) { return v; }