Visual scripting framework (mixed-reality driving simulator)
Designed and built it
2023
- Unity
- C#
- UI Toolkit
- ScriptableObjects
- JSON
- graph editor tooling
A visual scripting framework for a mixed-reality driving simulator, designed and built at NXRT. It replaced a legacy pipeline built on Fungus, an unmaintained third-party tool.
It is a Turing-complete scripting language, not a sequencer. That distinction is the point of the project.
The language
- Nodes are sequence nodes or branch nodes.
- Branching is parallel by default. Waiting is opt-in, used only where a later step genuinely depends on an earlier one.
- A stack-based singleton runtime executes asynchronous commands.
- Loops are not a language primitive. A loop is made by dependency-inverting an earlier stack command into a jump-back point, so the command points back into the stack.
The architecture
- Model, view and controller are split. The model is JSON plus ScriptableObjects referencing text assets; the view uses soft references by ID, with graph views in the editor and at runtime; the controller is the runtime.
- Scenarios are JSON, parsed at scenario start. A shipped build could be re-scripted and debugged at runtime, with no rebuild.
- The authoring UI was migrated to UI Toolkit.
What happened to it
- The core shipped in about three months.
- The full migration landed one to two months ahead of plan.
- Adoption went beyond my own department — the automotive team used it for per-manufacturer scenarios, the rail-simulation team for train scenarios.
- It outlived my employment.
There is no product screenshot. The diagram is a reconstruction.