IMultiplayerSpawner routes spawning requests for connecting players from the Muliplayer Gem to game logic utilizing it. More...
#include <IMultiplayerSpawner.h>
Inherited by Multiplayer::SimplePlayerSpawnerComponent.
Public Member Functions | |
AZ_RTTI (IMultiplayerSpawner, "{E5525317-A476-4209-BE45-477FB9D96083}") | |
virtual Multiplayer::NetworkEntityHandle | OnPlayerJoin (uint64_t userId, const Multiplayer::MultiplayerAgentDatum &agentDatum)=0 |
virtual void | OnPlayerLeave (Multiplayer::ConstNetworkEntityHandle entityHandle, const Multiplayer::ReplicationSet &replicationSet, AzNetworking::DisconnectReason reason)=0 |
IMultiplayerSpawner routes spawning requests for connecting players from the Muliplayer Gem to game logic utilizing it.
IMultiplayerSpawner is an AZ::Interface<T> that provides a mechanism to tell the Multiplayer Gem what to spawn on player connection. IMultiplayerSpawner is intended to be implemented on games utilizing the Multiplayer Gem. The Multiplayer Gem then calls the implementation via AZ::Interface.
|
pure virtual |
Invoked when a Client connects/ClientHost starts a session to determine what autonomous Prefab should be spawned where
userId | User ID of joining player |
agentDatum | Datum containing connection data that can be used to inform join logic |
Implemented in Multiplayer::SimplePlayerSpawnerComponent.
|
pure virtual |
Invoked when a Client disconnects from the session to determine how the autonomous prefab should be cleaned up
entityHandle | The entity handle to consider on leaving, generally the connection's primary player entity |
replicationSet | The replication set of the related connection |
reason | The cause of disconnection |
Implemented in Multiplayer::SimplePlayerSpawnerComponent.