Open 3D Engine Multiplayer Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Multiplayer::EntityReplicator Class Referencefinal

Handles replication of a single entity for one connection. More...

#include <EntityReplicator.h>

Inherits AZ::EntityBus::Handler.

Public Member Functions

 EntityReplicator (EntityReplicationManager &replicationManager, AzNetworking::IConnection *connection, NetEntityRole remoteNetworkRole, const ConstNetworkEntityHandle &entityHandle)
 
NetEntityRole GetBoundLocalNetworkRole () const
 
NetEntityRole GetRemoteNetworkRole () const
 
ConstNetworkEntityHandle GetEntityHandle () const
 
NetBindComponentGetNetBindComponent ()
 
void ActivateNetworkEntity ()
 
const PrefabEntityIdGetPrefabEntityId () const
 
bool IsPrefabEntityIdSet () const
 
bool OwnsReplicatorLifetime () const
 
bool RemoteManagerOwnsEntityLifetime () const
 
bool IsPendingRemoval () const
 
bool IsMarkedForRemoval () const
 
bool IsDeletionAcknowledged () const
 
void Initialize (const ConstNetworkEntityHandle &entityHandle)
 
void Reset (NetEntityRole remoteNetworkRole)
 
void MarkForRemoval ()
 
void SetPendingRemoval (AZ::TimeMs pendingRemovalTimeMs)
 
void ClearPendingRemoval ()
 
bool WasMigrated () const
 
void SetWasMigrated (bool wasMigrated)
 
bool IsReadyToActivate () const
 
void SetRebasing ()
 Set the next update packet to be a "rebase" message.
 
bool IsReadyToPublish () const
 True if the replicator is ready to start publishing changes, false if not.
 
bool IsRemoteReplicatorEstablished () const
 True if the remote replicator has acknowledged at least one update packet.
 
bool HasChangesToPublish ()
 True if there are any unacknowledged changes to publish.
 
bool PrepareToGenerateUpdatePacket ()
 
NetworkEntityUpdateMessage GenerateUpdatePacket ()
 Generate an update packet.
 
EntityMigrationMessage GenerateMigrationPacket ()
 Generate a migration packet.
 
void RecordSentPacketId (AzNetworking::PacketId sentId)
 After sending a generated packet, record the sent packet id for tracking acknowledgements.
 
bool HandlePropertyChangeMessage (AzNetworking::PacketId packetId, AzNetworking::ISerializer *serializer, bool notifyChanges)
 
bool IsPacketIdValid (AzNetworking::PacketId packetId) const
 
AzNetworking::PacketId GetLastReceivedPacketId () const
 
AZ::TimeMs GetResendTimeoutTimeMs () const
 
bool HandleRpcMessage (AzNetworking::IConnection *invokingConnection, NetworkEntityRpcMessage &entityRpcMessage)
 
void OnEntityActivated (const AZ::EntityId &) override
 
void OnEntityDestroyed (const AZ::EntityId &) override
 

Detailed Description

Handles replication of a single entity for one connection.

Member Function Documentation

◆ OnEntityActivated()

void Multiplayer::EntityReplicator::OnEntityActivated ( const AZ::EntityId &  )
override

AZ::EntityBus overrides

◆ PrepareToGenerateUpdatePacket()

bool Multiplayer::EntityReplicator::PrepareToGenerateUpdatePacket ( )

Start preparing the update packet.

Returns
true if there are any unacknowledged changes to publish, false if not.

The documentation for this class was generated from the following files: