Open 3D Engine LocalUser 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.
|
#include <LocalUserRequestBus.h>
Inherits AZ::EBusTraits.
Public Member Functions | |
virtual AZStd::shared_ptr< LocalUserProfile > | FindLocalUserProfile (AzFramework::LocalUserId localUserId)=0 |
virtual AZ::u32 | GetMaxLocalUsers () const =0 |
virtual bool | IsLocalUserSignedIn (AzFramework::LocalUserId localUserId)=0 |
virtual AZStd::string | GetLocalUserName (AzFramework::LocalUserId localUserId)=0 |
virtual AZ::u32 | AssignLocalUserIdToLocalPlayerSlot (AzFramework::LocalUserId localUserId, AZ::u32 localPlayerSlot=LocalPlayerSlotAny)=0 |
virtual AZ::u32 | RemoveLocalUserIdFromLocalPlayerSlot (AzFramework::LocalUserId localUserId)=0 |
virtual AzFramework::LocalUserId | GetLocalUserIdAssignedToLocalPlayerSlot (AZ::u32 localPlayerSlot)=0 |
virtual AZ::u32 | GetLocalPlayerSlotOccupiedByLocalUserId (AzFramework::LocalUserId localUserId)=0 |
virtual void | ClearAllLocalUserIdToLocalPlayerSlotAssignments ()=0 |
Clears all previously assigned local user id to local player slot associations. | |
Static Public Member Functions | |
static AzFramework::LocalUserId | GetPrimaryLocalUserId () |
static AzFramework::LocalUserId | GetLocalUserIdAt (AZ::u32 localPlayerSlot) |
static AZStd::shared_ptr< LocalUserProfile > | GetPrimaryLocalUserProfile () |
static AZStd::shared_ptr< LocalUserProfile > | GetLocalUserProfile (AzFramework::LocalUserId localUserId) |
static AZStd::shared_ptr< LocalUserProfile > | GetLocalUserProfileAt (AZ::u32 localPlayerSlot) |
Static Public Attributes | |
static const AZ::EBusHandlerPolicy | HandlerPolicy = AZ::EBusHandlerPolicy::Single |
static const AZ::EBusAddressPolicy | AddressPolicy = AZ::EBusAddressPolicy::Single |
EBus interface used to make queries/requests related to the assignment of local user ids to local player slots, along with queries/requests related to individual local user profiles.
Please note that while some platforms have no concept of a local user profile (in which case GetLocalUserProfile will always return null), most other functions will remain valid because on those platforms local user ids can be represented instead by unique input device indices.
|
pure virtual |
Assign a local user id into a local player slot.
[in] | localUserId | The local user id to assign into a local player slot. |
[in] | localPlayerSlot | The local player slot to assign the local user id into. LocalPlayerSlotAny uses the first available local slot. |
|
pure virtual |
Finds a specific local user profile based on their local user id.
[in] | localUserId | The local user id of the local user profile to retrieve. |
|
pure virtual |
Get the local player slot that a local user id is assigned to.
[in] | localUserId | The local user id to query. |
|
pure virtual |
Get the local user id that is assigned to a local player slot.
[in] | localPlayerSlot | The local player slot query. |
|
inlinestatic |
Convenience function to get the local user id that is assigned to a specified local slot.
[in] | localPlayerSlot | The local player slot to query. |
|
pure virtual |
Get the user name associated with a local user id. Platforms that have no concept of a local user profile will return "Player N" where "N" is the local player slot currently occupied by localUserId, or an empty string if they don't currently occupy a local slot.
[in] | localUserId | The local user id to query. |
|
inlinestatic |
Convenience function to get a specific local user profile based on their local user id.
[in] | localUserId | The local user id of the local user profile to retrieve. |
|
inlinestatic |
Convenience function to get the specific local user profile assigned to a local slot.
[in] | localPlayerSlot | The local player slot to query. |
|
pure virtual |
Query the maximum number of local uses that can be signed into the system concurrently.
|
inlinestatic |
Convenience function to get the local user id that is assigned to the primary local slot.
|
inlinestatic |
Convenience function to get the local user profile assigned to the primary local slot.
|
pure virtual |
Query whether a local user id is signed in. Please note that a user can be assigned to a local player slot but signed out, or signed in but not assigned to a local player slot.
On platforms with no concept of a local user profile, local user ids are instead unique input device indices, so while it may seem counter-intuitive this may still return true.
[in] | localUserId | The local user id to query. |
|
pure virtual |
Remove a local user id from a local player slot.
[in] | localUserId | The local user id to remove from a local player slot. |
|
static |
EBus Trait: requests can only be sent to and addressed by a single instance (singleton)