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

Inherits Multiplayer::ConstNetworkEntityHandle.

Public Member Functions

void Init ()
 Initializes the underlying entity if possible.
 
void Activate ()
 Activates the underlying entity if possible.
 
void Deactivate ()
 Deactivates the underlying entity if possible.
 
MultiplayerControllerFindController (const AZ::TypeId &typeId)
 Gets the BaseController from the first component on an Entity with the supplied typeId AND which inherits from Multiplayer::BaseComponent.
 
template<typename Controller >
Controller * FindController ()
 
AZ::Component * FindComponent (const AZ::TypeId &typeId)
 
template<typename ComponentType >
ComponentType * FindComponent ()
 
template<typename ControllerType >
ControllerType * FindController ()
 
 ConstNetworkEntityHandle ()=default
 Constructs a nullptr handle.
 
 ConstNetworkEntityHandle (AZ::Entity *entity, const NetworkEntityTracker *entityTracker=nullptr)
 
 ConstNetworkEntityHandle (const ConstNetworkEntityHandle &)=default
 
const AZ::Component * FindComponent (const AZ::TypeId &typeId) const
 
template<typename Component >
const Component * FindComponent () const
 
template<class ComponentType >
const ComponentType * FindComponent () const
 
- Public Member Functions inherited from Multiplayer::ConstNetworkEntityHandle
 ConstNetworkEntityHandle ()=default
 Constructs a nullptr handle.
 
 ConstNetworkEntityHandle (AZ::Entity *entity, const NetworkEntityTracker *entityTracker=nullptr)
 
 ConstNetworkEntityHandle (const ConstNetworkEntityHandle &)=default
 
bool operator< (const ConstNetworkEntityHandle &rhs) const
 
 operator bool () const
 
void Reset ()
 Resets the handle to a nullptr state.
 
void Reset (const ConstNetworkEntityHandle &handle)
 
NetEntityId GetNetEntityId () const
 
NetBindComponentGetNetBindComponent () const
 
const AZ::Component * FindComponent (const AZ::TypeId &typeId) const
 
template<typename Component >
const Component * FindComponent () const
 
template<class ComponentType >
const ComponentType * FindComponent () const
 
bool Exists () const
 
AZ::Entity * GetEntity ()
 
const AZ::Entity * GetEntity () const
 
bool operator== (const ConstNetworkEntityHandle &rhs) const
 
bool operator!= (const ConstNetworkEntityHandle &rhs) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Multiplayer::ConstNetworkEntityHandle
static bool Compare (const ConstNetworkEntityHandle &lhs, const ConstNetworkEntityHandle &rhs)
 Helper function for sorting EntityHandles by netEntityId.
 
- Protected Attributes inherited from Multiplayer::ConstNetworkEntityHandle
uint32_t m_changeDirty = 0
 
AZ::Entity * m_entity = nullptr
 
NetBindComponentm_netBindComponent = nullptr
 
const NetworkEntityTrackerm_networkEntityTracker = nullptr
 
NetEntityId m_netEntityId = InvalidNetEntityId
 

Member Function Documentation

◆ ConstNetworkEntityHandle()

Multiplayer::ConstNetworkEntityHandle::ConstNetworkEntityHandle ( AZ::Entity *  entity,
const NetworkEntityTracker entityTracker = nullptr 
)

Constructs a ConstNetworkEntityHandle given an entity, an entity tracker

Parameters
entitypointer to the entity to construct a ConstNetworkEntityHandle for
entityTrackerpointer to the entity tracker that tracks the entity can optionally be null in which case the entity tracker will be looked up

◆ FindComponent() [1/2]

template<typename Component >
const Component * Multiplayer::ConstNetworkEntityHandle::FindComponent ( ) const

Returns a specific component on of entity by class type.

Returns
pointer to the requested component, or nullptr if it doesn't exist on the entity

◆ FindComponent() [2/2]

const AZ::Component * Multiplayer::ConstNetworkEntityHandle::FindComponent ( const AZ::TypeId &  typeId) const

Returns a specific component on of entity given a typeId.

Parameters
typeIdthe typeId of the component to find and return
Returns
pointer to the requested component, or nullptr if it doesn't exist on the entity

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