Engine lifecycle
The core type is GnosisEngine (Core/Engine/GnosisEngine.cs). It does not know Unity; UnityGnosisEngine constructs it and drives timing.
Phases
InitializePermanentOnly— Builds a fresh rootGnosisState, creates permanent services from config, callsInitializeon each. Ephemeral services do not exist yet.InitializeNonPermanentServices— When a run starts, creates ephemeral services and initializes them.StartRun/EndRun— Notifies services in order:StartRuncallsOnRunStartedon permanent services, then ephemeral;EndRuncallsOnRunEndedon ephemeral first, then permanent.DestroyNonPermanentServices— Shuts down and clears ephemeral instances when leaving a run.Shutdown— Full teardown including permanent services.
What you get from the engine object
EventBus— Publish/subscribe and rule processing (IGnosisEventBus).Store— TheGnosisStorebacking all nodes; use this store when buildingGnosisNodepayloads so handles stay valid.State— CurrentGnosisState(invalid until initialized).GetService(id)— Resolve a service; includes a legacy aliasUI→UserInterface.CallFunction— Cross-service calls with communication policy checks.RunInvocationList— Execute JSON-shaped{ service, function, parameters }chains (used by boons, consumables, etc.).
Config object
Services are registered through GnosisEngineConfig (factories + lifetime). In Unity, that list is mirrored by GnosisEngineServiceEntry rows on the host component.
If you add a new first-party style service, you extend both the C# registration (however your project builds GnosisEngineConfig) and the inspector entries so adapters bind correctly.
Next: State & GnosisStore.
Last updated on