Installation
- Install Titan Twin from Fab into your engine, or copy the
TitanTwinfolder into your project’sPluginsfolder. - Open the project, go to Edit > Plugins, search for Titan Twin, enable it and restart the editor.
- All settings live under Edit > Project Settings > Game > Titan Twin …
Requirements: Windows 64-bit and an Unreal Engine version matching the package (5.5, 5.6 or 5.8). Pixel Streaming features additionally need Epic’s Pixel Streaming or Pixel Streaming 2 plugin.
All modules ship in one plugin. Modules you do not configure stay idle: no connection is opened until you enable it.
First-run checklist
Review these defaults once per project.
| Setting | Default | Recommendation |
|---|---|---|
| Titan Twin Backend › Auto Connect | On | Turn off unless you run a Titan Twin compatible backend; otherwise the plugin retries ws://127.0.0.1:8080 and logs warnings. |
| Titan Twin History › Recording / Persistence | On / On | Turn off if you do not need history. Files go to Saved/TitanTwin/History. |
| Titan Twin Alarm › Persistence Enabled | On | Transitions are written to Saved/TitanTwin/Alarms. |
| Titan Twin Runtime › History / Alarm / Command Owner | UE Local Services | Keep unless a backend owns them. |
| MQTT / OPC UA / HTTP / Pixel Streaming auto start | Off | Enable only the adapters you use. |
Quick start: one MQTT value on one actor
Goal: the topic factory/Robot01/Temperature with payload 86.5 shows up in a Blueprint variable of the actor Robot01.
- Mark the entity. Add a Twin Entity Component to the robot actor. On the placed instance, set Entity Id to
Robot01. - Add a binding. Add a Twin Property Binding Component with Source Property Name
Temperature, Target ScopeOwner Actorand Target Variable NameDisplayTemperature(a float or text variable). - Connect MQTT. In Titan Twin MQTT set Host and Port, add a subscription with Topic Filter
factory/+/+, Payload FormatScalar, Value TypeAuto, and enable Auto Connect. - Map addresses. In Titan Twin Data Sources enable Enable Automatic Mapping and Enable Runtime Rule Mapping, then add the rule
factory/{entity}/{property}. - Play. Publish
86.5.DisplayTemperatureupdates. Add an alarm rule to turn the robot red above 80.
For production projects prefer explicit mapping assets: they are reviewable and versioned with your content.
Key concepts
- Entity — an actor with a Twin Entity Component.
EntityIdis its stable external name. - Property sample — value + UTC timestamp + quality (Good, Uncertain, Bad, Unknown) + unit + source. Types: Boolean, Integer, Number, Text, Vector, Rotator.
- Data point — what an adapter produces: source id, address (topic, NodeId, field path…) and value.
- Mapping — decides which entity property a data point updates.
- Game thread — network work runs on worker threads; all entity and Blueprint updates happen on the game thread through bounded queues.
Entities have three independent states: Connection (Online / Offline), Operational (Idle / Active) and Health (Normal / Warning / Fault). A sample older than the current one is ignored, so late or duplicated network data cannot roll a value back.
Mapping
A mapping says: data from SourceId at Address goes to EntityId.PropertyName. Resolution order: explicit mappings for the same source and address, then explicit mappings with source None, then automatic rules.
Explicit mapping assets
Create a Data Asset of type Twin Data Source Mapping Asset, add entries (Source Id, Address, Entity Id, Property Name, optional unit) and add it to Titan Twin Data Sources › Mapping Assets. Runtime: Register Mapping, Register Mapping Asset, Clear Mappings.
Automatic rules
Templates with exactly one {entity} and one {property}; other placeholders match one segment and are ignored.
factory/{entity}/{property}
site/{site}/line/{line}/{entity}/{property}
ns=2;s={entity}/{property}
- Enable Automatic Mapping (editor): matches are saved to a mapping asset for review. Optional last-two-segments fallback.
- Enable Runtime Rule Mapping: rules evaluated at runtime, including packaged builds.
- Buffer Missing Entity Samples: values for entities that spawn later are kept and applied on registration.
| Queue setting | Default |
|---|---|
| Max Pending Points / Bytes | 8192 / 32 MB |
| Max Points Per Pump | 512 |
| Pump Time Budget | 2 ms |
| Clamp Future Timestamps | On (more than 5 s ahead → receive time) |
Diagnostics: Get Metrics, Get All Source Statuses, Preview Data Point.
MQTT
Native MQTT 3.1.1 client on its own thread. Host, Port, optional TLS (engine trust store plus optional CA file, host names verified), Clean Session, Client Id, Keep Alive, auto reconnect with back-off. Credentials come from the environment variables TITAN_MQTT_USERNAME / TITAN_MQTT_PASSWORD.
| Payload format | Example |
|---|---|
| Scalar | 86.5, true, RUN |
| Json | {"value":86.5,"timestamp":1731400000,"quality":"good","unit":"C"} |
| JsonBatch | {"line":"L1","devices":[{"id":"A","t":12}]} — one message, many entities, applied all-or-nothing |
Timestamps: ISO-8601 or Unix seconds / milliseconds. Binary payloads are ignored without dropping the connection. Optional command transport over JSON envelopes.
OPC UA
Client based on open62541. Endpoint opc.tcp://host:4840, security mode None, Sign or Sign And Encrypt. None is refused unless you explicitly allow it; secure modes need a client certificate, private key and trusted server certificates.
- Monitored nodes:
ns=2;i=1001orns=2;s=Machine/Temperature, with sampling interval and queue size. - Automatic discovery subscribes variables whose string NodeId contains
/or., ready for templates likens=2;s={entity}/{property}. - Writes convert to the node’s real data type without loss, or fail with a type mismatch. Command routes map
Entity + Commandto a NodeId.
HTTP
Polls any number of HTTP(S) endpoints with timeouts, retries and size limits. Bearer token from TITAN_HTTP_TOKEN, only sent to configured origins.
| Payload mode | Result |
|---|---|
| Scalar | Whole body is one value |
| JsonValue | Value at a dot path such as sensor.temperature |
| JsonObjectFields | Every top-level field becomes <prefix>/<field> |
| Auto | JSON if it parses, otherwise scalar |
Pixel Streaming
A web page sends data into the twin and receives property updates through Epic’s Pixel Streaming input.
{"type":"twin.data","address":"factory/scene/inside","value":1}
{"type":"twin.data.batch","points":[{"address":"a/b","value":2.5}]}
{"type":"twin.message","messageType":"ui.click","payload":{"id":"pump1"}}
Browser data uses the fixed source WebUI, only accepts mapped addresses by default and is rate limited. Outbound: Send Message, Send Data Point, Publish Snapshot and automatic property exports. A JavaScript client is included.
Backend (optional)
The Backend Connector talks to a Titan Twin compatible server over WebSocket (data, alarm snapshots, command updates) and HTTP (queries, alarm actions, commands). Without a server, keep UE Local Services and turn off Auto Connect.
Property bindings
The Twin Property Binding Component writes entity properties into variables without Blueprint wiring.
- Targets: owner actor, a component, a widget from a Widget Component, or an Anim Instance.
- Types: bool, integers, enums, float, double, String, Name, Text, Vector, Rotator, and UMG TextBlocks.
- Formatting: fractional digits, grouping, prefix and suffix.
- Bad or uncertain samples keep the last good value unless you accept them. Maximum Sample Age reports stale data.
Each binding reports Sample Status and Last Error; Validate Bindings checks targets without writing.
Alarms
Create a Twin Alarm Rule Set Data Asset and add it to Titan Twin Alarm › Rule Sets.
- Targets by Entity Id, type or Gameplay Tag query; signals from a property or entity state.
- Operators from
GreatertoContains, recovery threshold (hysteresis), debounce, delays and cooldown. - Severity Information → Emergency, message placeholders
{EntityId}{Value}, latching and auto close. - Lifecycle Active → Acknowledged → Resolved → Closed, with flood protection.
Every entity also gets summary properties such as Alarm.ActiveCount and Alarm.HighestSeverity. The Twin Alarm Response Component sets variables, recolors widgets or calls a Blueprint interface when alarms change.
Commands
Send commands to remote devices and follow them through Pending, Accepted, Running, Succeeded, Failed, Canceled, TimedOut or Rejected.
- OPC UA: a command route becomes a node write.
- MQTT: JSON envelopes; the device answers with acknowledgement, progress and result.
- Backend: HTTP request to your server.
To receive commands in Unreal, add a Twin Command Endpoint Component, list the allowed commands (none by default) and implement Twin Command Handler. Repeated command ids are not executed twice.
Commands can reach physical equipment. Keep device-side interlocks and permissions in place; the plugin does not replace them.
History (optional)
Records property samples and state changes in memory and, if persistence is on, as JSON Lines. Query with Query Memory or Query History Async; replay with Start Replay, Pause, Seek, Stop. Turn Recording Enabled off if you do not need it.
Known limits
- Win64 only.
- One MQTT broker and one OPC UA endpoint per project; HTTP supports many endpoints.
- No arrays, structures or OPC UA types such as LocalizedText and DateTime.
- Values are copied as-is: scaling or bit extraction happens upstream or in Blueprint.
- Default throughput limit is 512 points per pump (about 30,000 per second at 60 FPS); raise it at the cost of game-thread time.
Troubleshooting
- Nothing arrives. Check the adapter’s
Get Metricsand the log categoriesLogTitanTwinMqtt,LogTitanTwinOpcUa,LogTitanTwinDataSource. - Data arrives, property unchanged. Run
Preview Data Pointwith the source and address; checkUnmappedPointsandMissingEntityTargets. - Property changes, variable unchanged. Run
Validate Bindingsand read each binding’sLast Error. - Timestamps jump. Device clocks more than 5 s ahead of the PC are replaced by the receive time and logged.
When reporting a problem include the engine and plugin version, steps to reproduce and the first error in the log. Remove passwords and keys first.
Support
Email qiansongfu@gmail.com. Answers come from the developer.