The interface for managing all networked entities. More...
#include <INetworkEntityManager.h>
Inherited by Multiplayer::NetworkEntityManager.
Public Types | |
using | EntityList = AZStd::vector< NetworkEntityHandle > |
Public Member Functions | |
AZ_RTTI (INetworkEntityManager, "{109759DE-9492-439C-A0B1-AE46E6FD029C}") | |
virtual void | Initialize (const HostId &hostId, AZStd::unique_ptr< IEntityDomain > entityDomain)=0 |
virtual bool | IsInitialized () const =0 |
virtual IEntityDomain * | GetEntityDomain () const =0 |
virtual NetworkEntityTracker * | GetNetworkEntityTracker ()=0 |
virtual NetworkEntityAuthorityTracker * | GetNetworkEntityAuthorityTracker ()=0 |
virtual MultiplayerComponentRegistry * | GetMultiplayerComponentRegistry ()=0 |
virtual const HostId & | GetHostId () const =0 |
virtual EntityList | CreateEntitiesImmediate (const PrefabEntityId &prefabEntryId, NetEntityRole netEntityRole, const AZ::Transform &transform, AutoActivate autoActivate=AutoActivate::Activate)=0 |
virtual EntityList | CreateEntitiesImmediate (const PrefabEntityId &prefabEntryId, NetEntityId netEntityId, NetEntityRole netEntityRole, AutoActivate autoActivate, const AZ::Transform &transform)=0 |
virtual AZStd::unique_ptr< AzFramework::EntitySpawnTicket > | RequestNetSpawnableInstantiation (const AZ::Data::Asset< AzFramework::Spawnable > &netSpawnable, const AZ::Transform &transform)=0 |
virtual void | SetupNetEntity (AZ::Entity *netEntity, PrefabEntityId prefabEntityId, NetEntityRole netEntityRole)=0 |
virtual ConstNetworkEntityHandle | GetEntity (NetEntityId netEntityId) const =0 |
virtual uint32_t | GetEntityCount () const =0 |
virtual NetEntityId | GetNetEntityIdById (const AZ::EntityId &entityId) const =0 |
virtual NetworkEntityHandle | AddEntityToEntityMap (NetEntityId netEntityId, AZ::Entity *entity)=0 |
virtual void | RemoveEntityFromEntityMap (NetEntityId netEntityId)=0 |
virtual void | MarkForRemoval (const ConstNetworkEntityHandle &entityHandle)=0 |
virtual bool | IsMarkedForRemoval (const ConstNetworkEntityHandle &entityHandle) const =0 |
virtual void | ClearEntityFromRemovalList (const ConstNetworkEntityHandle &entityHandle)=0 |
virtual void | ClearAllEntities ()=0 |
Clears out and deletes all entities registered with the entity manager. | |
virtual void | AddEntityMarkedDirtyHandler (AZ::Event<>::Handler &entityMarkedDirtyHandle)=0 |
virtual void | AddEntityNotifyChangesHandler (AZ::Event<>::Handler &entityNotifyChangesHandle)=0 |
virtual void | AddEntityExitDomainHandler (EntityExitDomainEvent::Handler &entityExitDomainHandler)=0 |
virtual void | AddControllersActivatedHandler (ControllersActivatedEvent::Handler &controllersActivatedHandler)=0 |
virtual void | AddControllersDeactivatedHandler (ControllersDeactivatedEvent::Handler &controllersDeactivatedHandler)=0 |
virtual void | NotifyEntitiesDirtied ()=0 |
Notifies entities that they should process their dirty state. | |
virtual void | NotifyEntitiesChanged ()=0 |
Notifies entities that they should process change notifications. | |
virtual void | NotifyControllersActivated (const ConstNetworkEntityHandle &entityHandle, EntityIsMigrating entityIsMigrating)=0 |
virtual void | NotifyControllersDeactivated (const ConstNetworkEntityHandle &entityHandle, EntityIsMigrating entityIsMigrating)=0 |
virtual void | HandleLocalRpcMessage (NetworkEntityRpcMessage &message)=0 |
virtual void | HandleEntitiesExitDomain (const NetEntityIdSet &entitiesNotInDomain)=0 |
virtual void | ForceAssumeAuthority (const ConstNetworkEntityHandle &entityHandle)=0 |
virtual void | MarkAlwaysRelevantToClients (const ConstNetworkEntityHandle &entityHandle, bool alwaysRelevant)=0 |
virtual void | MarkAlwaysRelevantToServers (const ConstNetworkEntityHandle &entityHandle, bool alwaysRelevant)=0 |
virtual const NetEntityHandleSet & | GetAlwaysRelevantToClientsSet () const =0 |
virtual const NetEntityHandleSet & | GetAlwaysRelevantToServersSet () const =0 |
virtual void | SetMigrateTimeoutTimeMs (AZ::TimeMs timeoutTimeMs)=0 |
virtual void | DebugDraw () const =0 |
Visualization of network entity manager state. | |
The interface for managing all networked entities.
|
pure virtual |
Adds an event handler to be invoked when an entities controllers have activated
controllersActivatedHandler | event handler for the entity |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Adds an event handler to be invoked when an entities controllers have been deactivated
controllersDeactivatedHandler | event handler for the entity |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Adds an event handler to be invoked when we notify entities to send their change notifications.
entityNotifyChangesHandle | event handler for the dirtied entity |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Adds an event handler to be invoked when we notify which entities have been marked dirty.
entityMarkedDirtyHandle | event handler for the dirtied entity |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Adds an event handler to be invoked when we notify entities to send their change notifications.
entityNotifyChangesHandle | event handler for the dirtied entity |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Adds the provided entity to the internal entity map identified by the provided netEntityId.
netEntityId | the identifier to use for the added entity |
entity | the entity to add to the internal entity map |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Clears out and deletes all entities registered with the entity manager.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Unmarks the specified entity so it will no longer be removed and deleted.
entityHandle | the entity to unmark for removal and deletion |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Creates new entities of the given archetype This interface is internally used to spawn replicated entities
prefabEntryId | the name of the spawnable to spawn |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Creates new entities of the given archetype
prefabEntryId | the name of the spawnable to spawn |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Visualization of network entity manager state.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Forcibly assumes authoritative control over the given entity. This should only be used in the event of the unexpected loss of the previous authority, any other usage could corrupt the simulation.
entityHandle | the entity to forcibly assume authoritative control over |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Retrieves the set of network entities that should always be relevant to client connections.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Retrieves the set of network entities that should always be relevant to server connections.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns an ConstEntityPtr for the provided entityId.
netEntityId | the netEntityId to get an ConstEntityPtr for |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns the total number of entities tracked by this INetworkEntityManager instance.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns the entity domain associated with this network entity manager, this will be nullptr on clients.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns the HostId for this INetworkEntityManager instance.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns the MultiplayerComponentRegistry for this INetworkEntityManager instance.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns the Net Entity ID for a given AZ Entity ID.
entityId | the AZ Entity ID |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns the NetworkEntityAuthorityTracker for this INetworkEntityManager instance.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns the NetworkEntityTracker for this INetworkEntityManager instance.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Handles a set of entities transitioning between entity domains.
entitiesNotInDomain | the set of entities that are no longer contained within our entity domain |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Handle a local rpc message.
entityRpcMessage | the local rpc message to handle |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Configures the NetworkEntityManager.
hostId | the hostId of this NetworkEntityManager (invalid for clients) |
entityDomain | the entity domain used to determine which entities this manager has authority over |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns whether or not the network entity manager has been initialized.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Returns true if the indicated entity is marked for removal.
entityHandle | the entity to test if marked for removal |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Will toggle whether or not the provided entity should always be relevant to client connections. Use carefully, as this will cause the entity to bypass normal relevancy checks and could cause bandwidth issues.
entityHandle | const network entity handle to the entity to override relevancy for |
alwaysRelevant | a true value will enable always relevant, false will disable |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Will toggle whether or not the provided entity should always be relevant to server connections. Use carefully, as this will cause the entity to bypass normal relevancy checks and could cause bandwidth issues.
entityHandle | const network entity handle to the entity to override relevancy for |
alwaysRelevant | a true value will enable always relevant, false will disable |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Marks the specified entity for removal and deletion.
entityHandle | the entity to remove and delete |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Notifies that an entities controllers have activated.
entityHandle | handle to the entity whose controllers have activated |
entityIsMigrating | true if the entity is activating after a migration |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Notifies that an entities controllers have been deactivated.
entityHandle | handle to the entity whose controllers have been deactivated |
entityIsMigrating | true if the entity is deactivating due to a migration |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Notifies entities that they should process change notifications.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Notifies entities that they should process their dirty state.
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Removes the provided netEntityId from the internal entity map.
netEntityId | the identifier to use for the added entity |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Requests a network spawnable to instantiate at a given transform This is an async function. The instantiated entities are not available immediately but will be constructed by the spawnable system The spawnable ticket has to be kept for the whole lifetime of the entities
netSpawnable | the network spawnable to spawn |
transform | the transform where the spawnable should be spawned |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Overrides the default timeout time used during entity migrations.
timeoutTimeMs | the timeout time to use in milliseconds |
Implemented in Multiplayer::NetworkEntityManager.
|
pure virtual |
Configures new networked entity
netEntity | the entity to setup |
prefabEntryId | the name of the spawnable the entity originated from |
netEntityRole | the net role the entity should be setup for |
Implemented in Multiplayer::NetworkEntityManager.