Documentation Index
Fetch the complete documentation index at: https://dev.docs.inworld.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview > InworldEdgeAsset
Class: InworldEdgeAsset | Inherits from: ScriptableObject
Base ScriptableObject that represents an edge connection between nodes in graph workflows within the Inworld framework.
This asset can be created through Unity’s Create menu and used to define connections and flow control between nodes.
Used for implementing conditional logic, data flow routing, and execution control in AI conversation systems.
Properties
Methods
Reference
Graph
The graph asset that contains this edge.
Type
InworldGraphAsset (serialized)
Component
The component asset associated with this edge. Used for deriving ComponentID when set.
Type
InworldComponentAsset (serialized)
StartNode
The source node where this edge begins.
Type
InworldNodeAsset (serialized; public get/set via property StartNode)
EndNode
The destination node where this edge ends.
Type
InworldNodeAsset (serialized; public get/set via property EndNode)
IsRequired
Whether this edge is required for graph execution.
Type
bool (read-only)
IsLoop
Whether this edge creates a loop in the graph.
Type
bool (read-only)
IsMultiThread
Whether condition checking is performed on a separate thread.
Type
bool (serialized)
ShowTitle
Whether to display the edge title in the editor.
Type
bool (serialized)
AllowedPassByDefault
Default traversal behavior: when true, conditions allow passage by default.
Type
bool (serialized, protected)
EdgeTitle
Display title for this edge in the editor.
Type
string (serialized)
EdgeColor
The color used to display this edge in the editor.
Type
Color (get/set)
Runtime
The runtime edge instance created from this asset.
Type
InworldEdge (read-only)
Wrapper
Runtime wrapper encapsulating edge functionality.
Type
EdgeWrapper (get/set)
StartNodeName
Identifier of the start node for this edge.
Type
string (read-only)
EndNodeName
Identifier of the end node for this edge.
Type
string (read-only)
IsValid
Whether this edge has a valid runtime and is ready for execution.
Type
bool (read-only)
EdgeTypeName
Type name of this edge, used to register a custom edge condition. Derived classes override this value.
Type
string (virtual)
ComponentID
ID of the component associated with this edge. Falls back to EdgeTitle if component is not set or has no ID.
Type
string (read-only)
dataTypeConverterFunc
Delegate to convert data types during edge processing.
Type
ProcessBaseDataIODelegate (public)
CreateRuntime(graphAsset)
Creates the runtime representation of this edge within the specified graph and establishes node connections.
Parameters
| Parameter | Type | Description |
|---|
| graphAsset | InworldGraphAsset | The graph asset that will contain this edge. |
Returns
bool — true if runtime creation succeeded; otherwise, false.
CreateRuntime(wrapper)
Creates the runtime representation of this edge using an existing wrapper. Configures edge options and condition checking.
Parameters
| Parameter | Type | Description |
|---|
| wrapper | EdgeWrapper | The edge wrapper to use for runtime operations. |
Returns
bool — true if runtime creation succeeded; otherwise, false.
RegisterJson(graphAsset)
Registers this edge to the graph’s JSON representation. If EdgeTypeName is not empty, registers a custom edge condition with that name.
Parameters
| Parameter | Type | Description |
|---|
| graphAsset | InworldGraphAsset | The graph asset used during registration. |
Returns
bool — true if registration succeeded; otherwise, false.
MeetsCondition
Virtual method that evaluates edge traversal conditions. Default implementation returns AllowedPassByDefault. Derived classes override to implement custom logic.
Parameters
| Parameter | Type | Description |
|---|
| inputData | InworldBaseData | The input data to evaluate for edge traversal. |
Returns
bool — true if the condition is met and the edge should allow passage; otherwise, false.
SetEdgeCondition(customEdgeName)
Sets up the edge condition executor. Uses a threaded executor when IsMultiThread is true; otherwise uses the standard executor. Registers the executor under customEdgeName if provided.
Parameters
| Parameter | Type | Description |
|---|
| customEdgeName | string | Optional custom name for registering the edge condition. |
OnConditionCheck(data)
Static callback invoked by the executor to evaluate the last input and set the next output based on MeetsCondition.
Parameters
| Parameter | Type | Description |
|---|
| data | IntPtr | Pointer to the edge asset used during condition evaluation. |