Unreal Engine plugin that integrates the Element ECS core and the Oak scripting runtime into Unreal, wired together through element-oak-bridge.
It lets you drive entity/component simulation from a parallel ECS scheduler inside Unreal and author systems in Oak script, with the results rendered through ordinary Unreal actors.
FElementRuntimeScheduler(Public/ElementRuntime.h) — a conflict-aware parallel scheduler that runselm::Systembatches on Unreal's task graph, precomputing batch assignments so per-frame scheduling is free.- Oak bridge glue (
ElementOakBridge.*) — loads.oakprograms, registers native component types, and turns@ElementSystemfunctions intoelm::Systemvalues. AElementZombiesActor(ElementZombiesActor.*) — a sample actor that spawns and renders an ECS simulation via instanced static meshes, with parameters exposed in the editor.- Content/Scripts — example Oak scripts (
zombies.oak,math/vec3.oak).
The ElementRuntime module is a Runtime module built with C++20, RTTI disabled, and exceptions disabled.
This plugin bundles its native dependencies as git submodules:
| Path | Repository | Role |
|---|---|---|
element/ |
element | Header-only ECS core |
element-oak-bridge/ |
element-oak-bridge | Bridges the ECS to the Oak VM |
oak/ |
oak | Scripting language and runtime |
Clone with submodules:
git clone --recurse-submodules git@github.com:vladbelousoff/ElementRuntime.gitIf you already cloned without --recurse-submodules:
git submodule update --init --recursiveDrop this plugin under your project's Plugins/ directory (or use it as a submodule, as the Element project does) and regenerate project files. ElementRuntime.Build.cs resolves include paths from the bundled submodules by default, so no extra setup is required.
To point at checkouts or install roots elsewhere, set any of these environment variables before building:
| Variable | Overrides | Default |
|---|---|---|
ELEMENT_ROOT |
Element include root | <plugin>/element |
ELEMENT_OAK_BRIDGE_ROOT |
Bridge include root | <plugin>/element-oak-bridge |
OAK_ROOT |
Oak source root | <plugin>/oak |
The build defines OAK_ATOMIC_REFCOUNT=1 and OAK_STATIC=1 so the Oak runtime is compiled into the module statically with atomic refcounting.
Place an AElementZombiesActor in a level and adjust its Element / Element|Camera / Element|Flamethrower properties in the editor. On begin play the actor builds the ECS world, loads its Oak scripts, and steps the simulation through FElementRuntimeScheduler each tick.
See the Element README for ECS and scheduler concepts, and the element-oak-bridge README for the Oak integration API.