To allow Unreal to replicate through the SpatialOS network stack and combine multiple dedicated server instances across one seamless game world, the GDK has to adapt Unreal networking functionality to work with the SpatialOS Worker API. One of the ways it does this is with dynamic typebinding.
Dynamic typebinding relies on type reference lookups at runtime rather than at compile time. This accelerates the development process.
Dynamic typebindings use the GDK-generated SpatialOS schema, which contains the SpatialOS schema definition of any Unreal object, its replicated data and RPCs.
The GDK generates schema for Unreal classes tagged with the Spatial Type specifier. A number of Unreal components are represented in the schema.
For Unreal Actors and sub-objects:
- Replicated property schema component (for example,
MyActor): Contains all the replicated properties (including inherited) present on the object, except those tagged with the
- Owner-only schema component (for example,
MyActorOwnerOnly): Contains all the
COND_AutonomousOnlyreplicated properties excluded from the replicated property schema component.
- Handover schema component (for example,
MyActorHandover): Contains all handover properties (including inherited) present on the object.
In addition, Unreal Actors also generate (where relevant):
- Client/Server/CrossServer RPC schema components (for example,
MyActorClientRPCS): Each RPC category has its own SpatialOS component containing all the Actor’s RPCs for that category converted into SpatialOS commands.
- NetMulticast RPC schema component (for example,
MyActorNetMulticastRPCS): Contains all the multicast RPCs callable on this Actor, converted into SpatialOS events.
- Static sub-object schema components: For each static sub-object present on this Actor, additional schema components are generated which wrap the replicated and handover properties defined in the components above.
When comparing the two network stacks, it’s useful to keep the following mappings between Unreal terms and SpatialOS terms in mind:
- Unreal Actor <-> SpatialOS entity
- Unreal Replicating Property <-> SpatialOS field
- Unreal Client/Server RPC <-> SpatialOS command
- Unreal NetMulticast RPC <-> SpatialOS event
- Unreal Replication Condition <-> SpatialOS component design
For more information on schemas, see the Schema reference documentation.
2020-10-01 Page clarified with editorial review
2020-02-21 Page updated with limited editorial review
2019-06-27 Page updated with limited editorial review
Updated 12 months ago