Creating the runtime from JSON is still experimental.Behavior may change at any time, and JSON generated by the Graph View Editor may encounter various issues.
Run the Template
- Go to
Assets/InworldRuntime/Scenes/Nodesand play theCharacterInteractionNodeWithJsonscene.
- After the scene loads, you can enter text and press Enter or click the
SENDbutton to submit. - You can also hold the
Recordbutton to record audio, then release it to send. - All behavior should be exactly the same as the Character Interaction Demo.
Understanding the Graph
The graph should be exactly the same as the Character Interaction Demo.
JSON structure
A valid JSON contains the following sections: schema_version, components, and main. In main, provide the id, then list nodes and edges, and finally define start_nodes and end_nodes.unity_character_engine.json
schema_version
For now, use 1.0.0.components

unity_character_engine.json
Custom edges and components
All custom edges are also components. When writing JSON, explicitly declare them inside components.unity_character_engine.json
Relationship between nodes and components
When creating the runtime from JSON, the component field in the NodeAsset (if present) must be filled in.
main
The entire graph—its nodes, edges, start_nodes, and end_nodes—must be defined here.node
For user-defined nodes, provide the name of the C# class, for exampleFilterInputNodeAsset.cs
edge
For edges, ensure the ids match.InworldController
TheInworldController only provides the InworldAudioManager for audio output and does not require any Primitive modules.

Workflow
- When the game starts,
InworldControllerinitializes immediately because there are no modules. - Next,
InworldGraphExecutorinitializes its graph asset by calling each component’sCreateRuntime(). - When the graph runs
CreateRuntime(), if a JSON file is present it first runsParseJson(), uses Newtonsoft.Json, and stores all JSON data into dictionaries.
InworldGraphAsset.cs
- When each node/edge creates its runtime, it first calls
RegisterJson()to apply the values fromm_JsonNodeRegistryandm_JsonEdgeRegistry.
CreateRuntime() API calls are skipped.
InworldGraphAsset.cs
- During compilation, we call
InitializeRegistries()to initialize all Primitive modules in a special way.
- After that, run
GraphParser.ParseGraph()and pass other user data as needed to produce theCompiledGraph()
InworldGraphAsset.cs
- The remaining flow is identical to the Character Interaction Node