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

Inherits AZ::Component.

Public Member Functions

 AZ_CLASS_ALLOCATOR (MultiplayerComponent, AZ::SystemAllocator)
 
 AZ_RTTI (MultiplayerComponent, "{B7F5B743-CCD3-4981-8F1A-FC2B95CE22D7}", AZ::Component)
 
NetEntityId GetNetEntityId () const
 
bool IsNetEntityRoleAuthority () const
 
bool IsNetEntityRoleAutonomous () const
 
bool IsNetEntityRoleServer () const
 
bool IsNetEntityRoleClient () const
 
ConstNetworkEntityHandle GetEntityHandle () const
 
NetworkEntityHandle GetEntityHandle ()
 
void MarkDirty ()
 
virtual void OnNetworkActivated ()
 
virtual void SetOwningConnectionId (AzNetworking::ConnectionId connectionId)=0
 
virtual NetComponentId GetNetComponentId () const =0
 
virtual bool HandleRpcMessage (AzNetworking::IConnection *invokingConnection, NetEntityRole netEntityRole, NetworkEntityRpcMessage &rpcMessage)=0
 
virtual bool SerializeStateDeltaMessage (ReplicationRecord &replicationRecord, AzNetworking::ISerializer &serializer)=0
 
virtual void NotifyStateDeltaChanges (ReplicationRecord &replicationRecord)=0
 
virtual bool HasController () const =0
 
virtual MultiplayerControllerGetController ()=0
 
virtual const MultiplayerControllerGetController () const =0
 
const NetBindComponentGetNetBindComponent () const
 
NetBindComponentGetNetBindComponent ()
 
template<typename ComponentType >
const ComponentType * FindComponent () const
 
template<typename ComponentType >
ComponentType * FindComponent ()
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 

Protected Member Functions

virtual void ConstructController ()=0
 
virtual void DestructController ()=0
 
virtual void ActivateController (EntityIsMigrating entityIsMigrating)=0
 
virtual void DeactivateController (EntityIsMigrating entityIsMigrating)=0
 
virtual void NetworkAttach (NetBindComponent *netBindComponent, ReplicationRecord &currentEntityRecord, ReplicationRecord &predictableEntityRecord)=0
 

Protected Attributes

NetBindComponentm_netBindComponent = nullptr
 
AZ::Event ::Handler m_networkActivatedHandler
 

Friends

class NetworkEntityHandle
 
class NetBindComponent
 
class MultiplayerController
 

Member Function Documentation

◆ FindComponent()

template<typename ComponentType >
const ComponentType * Multiplayer::MultiplayerComponent::FindComponent
inline

Linearly searches the components attached to the entity and returns the requested component.

Returns
the requested component, or nullptr if the component does not exist on the entity

◆ GetNetBindComponent()

const NetBindComponent* Multiplayer::MultiplayerComponent::GetNetBindComponent ( ) const

Returns the NetBindComponent responsible for network binding for this entity.

Returns
the NetBindComponent responsible for network binding for this entity

◆ OnNetworkActivated()

virtual void Multiplayer::MultiplayerComponent::OnNetworkActivated ( )
inlinevirtual

Override to run component logic when the NetworkEntity has completed network activation Invoked when the NetworkEntity is attached and has RPCs bound via m_networkActivatedHandler Requires m_networkActivatedHandler be registered via NetBindComponent::AddNetworkActivatedEventHandler


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