Transfer an entity to a spatial domain - AWS SimSpace Weaver

Transfer an entity to a spatial domain

After a custom app or service app creates an entity, the app must transfer the entity to a spatial domain in order for the entity to exist spatially in the simulation. Entities in a spatial domain can be read by other apps and updated by a spatial app. Use the ModifyEntityDomain() API to transfer an entity to a spatial domain.

AWS_WEAVERRUNTIME_API Result<void> ModifyEntityDomain(Transaction& txn, const Entity& entity, DomainId domainId) noexcept;

If the DomainId doesn't match the assigned Partition of the calling app, then the DomainId must be for a DomainType::Spatial Domain. The ownership transfer to the new Domain occurs during the Commit(Transaction&&).


The current Transaction.


The target Entity for the change of Domain.


The DomainId of the destination Domain for the Entity.

This API returns Success if the entity domain was successfully changed.