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::NetworkEntityUpdateMessage Class Reference

Property replication packet. More...

#include <NetworkEntityUpdateMessage.h>

Public Member Functions

 AZ_TYPE_INFO (NetworkEntityUpdateMessage, "{CFCA08F7-547B-4B89-9794-37A8679608DF}")
 
 NetworkEntityUpdateMessage (NetworkEntityUpdateMessage &&rhs)
 
 NetworkEntityUpdateMessage (const NetworkEntityUpdateMessage &rhs)
 
 NetworkEntityUpdateMessage (NetEntityRole entityRole, NetEntityId entityId, bool isDeleted, bool isMigrated)
 
NetworkEntityUpdateMessageoperator= (NetworkEntityUpdateMessage &&rhs)
 
NetworkEntityUpdateMessageoperator= (const NetworkEntityUpdateMessage &rhs)
 
bool operator== (const NetworkEntityUpdateMessage &rhs) const
 
bool operator!= (const NetworkEntityUpdateMessage &rhs) const
 
uint32_t GetEstimatedSerializeSize () const
 
NetEntityRole GetNetworkRole () const
 
NetEntityId GetEntityId () const
 
bool GetIsDelete () const
 
bool GetWasMigrated () const
 
bool GetHasValidPrefabId () const
 
void SetPrefabEntityId (const PrefabEntityId &value)
 
const PrefabEntityIdGetPrefabEntityId () const
 
void SetData (const AzNetworking::PacketEncodingBuffer &value)
 
const AzNetworking::PacketEncodingBuffer * GetData () const
 
AzNetworking::PacketEncodingBuffer & ModifyData ()
 
bool Serialize (AzNetworking::ISerializer &serializer)
 

Detailed Description

Property replication packet.

Constructor & Destructor Documentation

◆ NetworkEntityUpdateMessage()

Multiplayer::NetworkEntityUpdateMessage::NetworkEntityUpdateMessage ( NetEntityRole  entityRole,
NetEntityId  entityId,
bool  isDeleted,
bool  isMigrated 
)
explicit

Constructor for add/update/delete message. The prefab id isn't required by the constructor because it doesn't change for an entity, so resending it after the remote replicator is established would be redundant and wasted bandwidth. It should only get set on messages until the remote replicator is established.

Parameters
entityRolethe role of the entity being replicated
entityIdthe networkId of the entity being replicated
isDeletedtrue if deleted as a part of the update
isMigratedtrue if migrated, false if not.

Member Function Documentation

◆ GetData()

const AzNetworking::PacketEncodingBuffer * Multiplayer::NetworkEntityUpdateMessage::GetData ( ) const

Gets the current value of Data.

Returns
the current value of Data

◆ GetEntityId()

NetEntityId Multiplayer::NetworkEntityUpdateMessage::GetEntityId ( ) const

Gets the entity's networkId.

Returns
the entity's networkId

◆ GetEstimatedSerializeSize()

uint32_t Multiplayer::NetworkEntityUpdateMessage::GetEstimatedSerializeSize ( ) const

Returns an estimated serialization footprint for this NetworkEntityUpdateMessage.

Returns
an estimated serialization footprint for this NetworkEntityUpdateMessage

◆ GetHasValidPrefabId()

bool Multiplayer::NetworkEntityUpdateMessage::GetHasValidPrefabId ( ) const

Gets the current value of HasValidPrefabId.

Returns
the current value of HasValidPrefabId

◆ GetIsDelete()

bool Multiplayer::NetworkEntityUpdateMessage::GetIsDelete ( ) const

Gets the current value of IsDelete (true if this represents a DeleteProxy message).

Returns
the current value of IsDelete

◆ GetNetworkRole()

NetEntityRole Multiplayer::NetworkEntityUpdateMessage::GetNetworkRole ( ) const

Gets the current value of NetworkRole.

Returns
the current value of NetworkRole

◆ GetPrefabEntityId()

const PrefabEntityId & Multiplayer::NetworkEntityUpdateMessage::GetPrefabEntityId ( ) const

Gets the current value of PrefabEntityId.

Returns
the current value of PrefabEntityId

◆ GetWasMigrated()

bool Multiplayer::NetworkEntityUpdateMessage::GetWasMigrated ( ) const

Returns whether or not the entity was migrated.

Returns
whether or not the entity was migrated

◆ ModifyData()

AzNetworking::PacketEncodingBuffer & Multiplayer::NetworkEntityUpdateMessage::ModifyData ( )

Retrieves a non-const reference to the value of Data.

Returns
a non-const reference to the value of Data

◆ Serialize()

bool Multiplayer::NetworkEntityUpdateMessage::Serialize ( AzNetworking::ISerializer &  serializer)

Base serialize method for all serializable structures or classes to implement.

Parameters
serializerISerializer instance to use for serialization
Returns
boolean true for success, false for serialization failure

◆ SetData()

void Multiplayer::NetworkEntityUpdateMessage::SetData ( const AzNetworking::PacketEncodingBuffer &  value)

Sets the current value for Data

Parameters
valuethe value to set Data to

◆ SetPrefabEntityId()

void Multiplayer::NetworkEntityUpdateMessage::SetPrefabEntityId ( const PrefabEntityId value)

Sets the current value for PrefabEntityId.

Parameters
valuethe value to set PrefabEntityId to

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