Skip to main content

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 > Inworld Graph Asset Class: InworldGraphAsset | Inherits from: ScriptableObject ScriptableObject that represents a complete graph workflow within the Inworld framework. This asset can be created through Unity’s Create menu and used to define conversational AI flows. Used for configuring nodes, edges, and execution logic for AI conversation systems and workflows. InworldGraphAsset Unity Inspector

Properties

Methods

Reference

Runtime

Gets the runtime graph instance. Provides access to the active graph structure during execution.

Returns

Type: InworldGraph

Executor

Gets the executor interface for this graph. Provides access to the execution controller for managing graph flow.

Returns

Type: ExecutorInterface

Components

Gets the collection of components in this graph. Provides access to all processing nodes that define the conversation logic.

Returns

Type: List<InworldComponentAsset>

Nodes

Gets the collection of nodes in this graph. Provides access to all processing nodes that define the conversation logic.

Returns

Type: List<InworldNodeAsset>

Edges

Gets the collection of edges in this graph. Provides access to all connections between nodes in the conversation flow.

Returns

Type: List<InworldEdgeAsset>

StartNode

Gets or sets the starting node for this graph. Provides access to the entry point node for conversation flow.

Returns

Type: InworldNodeAsset

EndNode

Gets the primary ending node for this graph. Provides access to the main exit point node for conversation flow.

Returns

Type: InworldNodeAsset

EndNodes

Gets the collection of alternative ending nodes for this graph. Provides access to multiple possible exit points for different conversation outcomes.

Returns

Type: List<InworldNodeAsset>

PlayerName

Gets the player name for this graph. Provides access to the player identifier used in conversation flow.

Returns

Type: string

Name

Gets the name of this graph. Provides access to the graph identifier for reference and debugging.

Returns

Type: string

TempData

Gets or sets temporary data for users to store their own data that’s executing graph in the middle.

Returns

Type: string

NeedClearHistory

Gets a value indicating whether the graph needs to clear history.

Returns

Type: bool

ClearGraphRuntime

Clears all runtime objects and disposes of resources used by the graph execution. Stops the executor, disposes of compiled graph, and cleans up node and edge runtime data.

ClearHistory

Clears the conversation history for this graph.

ClearGraphEditorTime

Clears all editor-time graph data and resets the graph to an empty state. Removes all node connections, clears start/end nodes, and empties the node and edge collections.

CreateRuntime

Creates the runtime representation of this graph for execution. Initializes runtime graph, creates node and edge runtime objects, and sets up start/end nodes.

Returns

Type: bool - True if runtime creation succeeded; otherwise, false.

SetupStartNodesRuntime

Sets up the starting node for runtime execution. Configures the graph’s entry point for conversation flow.

Returns

Type: bool - True if start node setup succeeded; otherwise, false.

SetupEndNodesRuntime

Sets up the ending nodes for runtime execution. Configures the graph’s exit points for conversation flow completion.

Returns

Type: bool - True if end node setup succeeded; otherwise, false.

CreateEdgesRuntime

Creates runtime representations for all edges in the graph. Initializes edge runtime objects for connection logic between nodes.

Returns

Type: bool - True if edge runtime creation succeeded; otherwise, false.

CreateNodesRuntime

Creates runtime representations for all nodes in the graph. Initializes node runtime objects and adds them to the runtime graph.

Returns

Type: bool - True if node runtime creation succeeded; otherwise, false.

CompileRuntime

Compiles the runtime graph for optimized execution. Creates a compiled graph interface that provides efficient execution capabilities.

Returns

Type: bool - True if graph compilation succeeded; otherwise, false.

CreateExecutorRuntime

Creates the executor interface for running the compiled graph. Initializes the execution controller that manages graph flow and state.

Returns

Type: bool - True if executor creation succeeded; otherwise, false.

StartRuntime

Starts the runtime execution of the graph. Begins the conversation flow using the configured executor.

Returns

Type: bool - True if runtime startup succeeded; otherwise, false.

InitializeRegistries

Initializes the component registries for JSON-based graph execution. This function needs to be optimized and is currently used in JSON referenced classes.

Returns

Type: bool - True if initialization succeeded; otherwise, false.

LoadGameData

Loads game data for the graph execution.

Returns

Type: bool - True if data loading succeeded; otherwise, false.

SaveJson

Saves the graph configuration to a JSON file. Exports the graph structure, components, nodes, edges, and start/end nodes to JSON format.
void SaveJson(string outPath)

Parameters

ParameterTypeDescription
outPathstringThe file path where the JSON will be saved

ParseJson

Parses the JSON configuration for JSON-based graph execution. Initializes JSON node and edge registries from the graph JSON file.

RegisterJsonNode

Registers a JSON node for execution tracking.
bool RegisterJsonNode(string nodeName)

Parameters

ParameterTypeDescription
nodeNamestringThe name of the node to register

Returns

Type: bool - True if registration succeeded; otherwise, false.

RegisterJsonEdge

Registers a JSON edge for execution tracking.
bool RegisterJsonEdge(string startNodeName, string endNodeName)

Parameters

ParameterTypeDescription
startNodeNamestringThe name of the start node
endNodeNamestringThe name of the end node

Returns

Type: bool - True if registration succeeded; otherwise, false.

Serialized Fields

The following fields are configurable in the Unity Inspector:
  • m_PlayerName (string) - The name identifier for the player in this graph (default: “Player”)
  • m_GraphName (string) - The name identifier for this graph (default: “New Graph”)
  • m_GraphJson (TextAsset) - JSON file for JSON-based graph compilation
  • m_UserData (InworldUserData) - User data for graph execution
  • m_Components (List<InworldComponentAsset>) - Components used by this graph
  • m_Nodes (List<InworldNodeAsset>) - Collection of nodes that make up this graph workflow
  • m_StartNode (InworldNodeAsset) - The starting node for graph execution
  • m_EndNode (InworldNodeAsset) - The primary ending node for graph execution
  • m_EndNodes (List<InworldNodeAsset>) - Alternative ending nodes for graph execution
  • m_Edges (List<InworldEdgeAsset>) - Collection of edges that connect nodes in this graph