The bindings module is the bridge between a C# script and the engine. The scripting module hosts the .NET
runtime and owns the core of the native table (logging, entities, components, queries); the bindings fill the
rest of it: transforms and the hierarchy, scenes and prefabs, physics, audio, input, assets, diagnostics and the
module registry, and they ship the C# facades (Transform, Rigidbody, Prefab, Scene, Physics, Audio,
Input, Diagnostics, Modules) and the [NativeComponent] mirrors through which a script reads and writes
the engine's own components. Native code lives in namespace conjure::bindings; the C# side is
Conjure.Managed, namespace Conjure.
A script is a ScriptBehaviour subclass in your game assembly. The engine creates it when its entity gets the
component, calls OnCreate, OnStart, OnFixedUpdate, OnUpdate, OnLateUpdate, OnDestroy and the
collision callbacks, and destroys it with the entity.
Everything a script touches goes through one native table: Entity.Create, Transform.Position,
Rigidbody.AddForce, Prefab.Instantiate, Physics.Raycast, Audio.PlayOneShot are thin calls into
entries the bindings module filled before the game assembly loaded.
Component data crosses as plain structs: LocalTransform, RigidBodyData, AudioSourceData and the other
mirrors have exactly the native layout (size and layout hash are checked the first time a mirror is used), so
Entity.GetComponent<T>() is a copy, SetComponent a copy back, and ComponentQuery hands out Span<T> over
whole chunks.
Structural changes (create, destroy, add, remove, reparent) are applied at once from an ordinary callback and
deferred to the end of the phase from inside a ComponentQuery scope, where the world is locked.
Failures are exceptions on the C# side (EntityNotAliveException, AssetNotLoadedException,
NotSupportedException for a compiled-out subsystem, ConjureNativeException otherwise); predicates such
as IsAlive and IsPlaying never throw.
write scripts: entities, transforms and the hierarchy, components and mirrors, physics, audio, input, assets, scenes and prefabs, diagnostics, DOD queries, hot reload
understand or extend the native side: scripting_bindings_subsystem, filling and counting the table, marshalling, the status protocol, the call counters tests read
usingSystem.Numerics;usingConjure;namespaceGame;publicsealedclassBouncer:ScriptBehaviour{publicfloatImpulse=5.0f;publicAssetRef<AudioClipAsset>Boing;protectedoverridevoidOnStart(){Transformtransform=Transform;// a readonly struct: copy before writing a propertytransform.Position=newVector3(0.0f,2.0f,0.0f);}protectedoverridevoidOnCollisionEnter(inCollisioncollision){newRigidbody(Entity).AddForce(Vector3.UnitY*Impulse,ForceMode.Impulse);Audio.PlayOneShot(Boing,Transform.Position);Diagnostics.Check("bouncer.hit",collision.Other.IsAlive,"the other entity is alive");}}
the conjure_native_api struct of function pointers the managed side calls; filled by scripting (core entries) and bindings (the thirteen bindings groups)
mirror
a C# struct with the exact layout of a native component ([NativeComponent("conjure.scene.local_transform")])
facade
a C# wrapper struct or static class over native entries (Transform, Rigidbody, Physics)
DOD scope
a ComponentQuery between Begin and Dispose: the world is locked, spans are live, structural requests are deferred
stub
the entry installed for a compiled-out or disabled group: answers NOT_SUPPORTED and names the entry
call counter
one u32 per entry, incremented outside Distribution; the feature-test scene proves every entry is exercised