Open 3D Engine AzCore 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.
AZ::UserSettingsComponent Class Reference

#include <UserSettingsComponent.h>

Inherits AZ::Component, and UserSettingsComponentRequestBus::Handler.

Public Member Functions

 AZ_COMPONENT (UserSettingsComponent, "{A316662A-6C3E-43E6-BC61-4B375D0D83B4}")
 
 UserSettingsComponent (u32 providerId=UserSettings::CT_GLOBAL)
 
void SetProviderId (u32 providerId)
 
u32 GetProviderId ()
 
- Public Member Functions inherited from AZ::Component
 AZ_TYPE_INFO_WITH_NAME_DECL (Component)
 
 AZ_RTTI_NO_TYPE_INFO_DECL ()
 
 Component ()
 
virtual ~Component ()
 
EntityGetEntity () const
 
EntityId GetEntityId () const
 
NamedEntityId GetNamedEntityId () const
 
ComponentId GetId () const
 
virtual TypeId GetUnderlyingComponentType () const
 
void SetId (const ComponentId &id)
 
virtual void SetSerializedIdentifier (AZStd::string serializedIdentifer)
 
virtual AZStd::string GetSerializedIdentifier () const
 
virtual ComponentValidationResult ValidateComponentRequirements (const ImmutableEntityVector &, const AZStd::unordered_set< AZ::Crc32 > &) const
 
bool SetConfiguration (const AZ::ComponentConfig &config)
 
bool GetConfiguration (AZ::ComponentConfig &outConfig) const
 

Protected Member Functions

void Activate () override
 
void Deactivate () override
 
void Load () override
 
void Save () override
 
void Finalize () override
 
void DisableSaveOnFinalize () override
 
- Protected Member Functions inherited from AZ::Component
virtual void Init ()
 
virtual void Activate ()=0
 
virtual void Deactivate ()=0
 
virtual bool ReadInConfig (const ComponentConfig *baseConfig)
 
virtual bool WriteOutConfig (ComponentConfig *outBaseConfig) const
 
virtual void SetEntity (Entity *entity)
 
virtual void OnAfterEntitySet ()
 Function to call after setting the entity in this component.
 

Static Protected Member Functions

static void GetProvidedServices (ComponentDescriptor::DependencyArrayType &provided)
 ComponentDescriptor::GetProvidedServices
 
static void Reflect (ReflectContext *reflection)
 \red ComponentDescriptor::Reflect
 

Protected Attributes

UserSettingsProvider m_provider
 
u32 m_providerId
 
bool m_saveOnFinalize = true
 
- Protected Attributes inherited from AZ::Component
Entitym_entity
 Reference to the entity that owns the component. The value is null if the component is not attached to an entity.
 
ComponentId m_id
 A component ID that is unique for an entity. This component ID is not unique across all entities.
 

Detailed Description

Member Function Documentation

◆ Activate()

void AZ::UserSettingsComponent::Activate ( )
overrideprotectedvirtual

Puts the component into an active state. The system calls this function once during activation of each entity that owns the component. You must override this function. The system calls a component's Activate() function only if all services and components that the component depends on are present and active. Use GetProvidedServices and GetDependentServices to specify these dependencies.

Implements AZ::Component.

◆ Deactivate()

void AZ::UserSettingsComponent::Deactivate ( )
overrideprotectedvirtual

Deactivates the component. The system calls this function when the owning entity is being deactivated. You must override this function. As a best practice, ensure that this function returns the component to a minimal footprint. The order of deactivation is the reverse of activation, so your component is deactivated before the components it depends on.

The system always calls the component's Deactivate() function before destroying the component. However, deactivation is not always followed by the destruction of the component. An entity and its components can be deactivated and reactivated without being destroyed. Ensure that your Deactivate() implementation can handle this scenario.

Implements AZ::Component.


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