Open 3D Engine AzCore API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
AZ::ModuleManager Class Reference

#include <ModuleManager.h>

Inherits Handler, and Handler.

Public Member Functions

 AZ_CLASS_ALLOCATOR (ModuleManager, AZ::OSAllocator, 0)
void UnloadModules ()
void AddModuleEntity (ModuleEntity *moduleEntity)
void DeactivateEntities ()
void SetSystemComponentTags (AZStd::string_view tags)
const AZStd::vector< Crc32 > & GetSystemComponentTags ()

Static Public Member Functions

static void Reflect (ReflectContext *context)

Public Attributes

bool m_quitRequested = false

Protected Types

using ModuleNameNameToModuleDataMap = AZStd::unordered_map< AZ::OSString, AZStd::weak_ptr< ModuleDataImpl > >

Protected Member Functions

void EnumerateModules (EnumerateModulesCallback perModuleCallback) override
LoadModuleOutcome LoadDynamicModule (const char *modulePath, ModuleInitializationSteps lastStepToPerform, bool maintainReference) override
LoadModulesResult LoadDynamicModules (const ModuleDescriptorList &modules, ModuleInitializationSteps lastStepToPerform, bool maintainReferences) override
LoadModulesResult LoadStaticModules (CreateStaticModulesCallback staticModulesCb, ModuleInitializationSteps lastStepToPerform) override
bool IsModuleLoaded (const char *modulePath) override
AZStd::shared_ptr< ModuleDataImplGetLoadedModule (AZStd::string_view modulePath)
void HandleDependencySortError (const Entity::DependencySortOutcome &outcome)
void OnEntityActivated (const AZ::EntityId &entityId) override
void ActivateEntities (const AZStd::vector< AZStd::shared_ptr< ModuleDataImpl >> &modulesToInit)

Static Protected Member Functions

static AZ::OSString PreProcessModule (AZStd::string_view moduleName)

Protected Attributes

AZStd::vector< Crc32m_systemComponentTags
AZ::Entity::ComponentArrayType m_systemComponents
 System components we own and are responsible for shutting down.
AZStd::vector< AZStd::shared_ptr< ModuleDataImpl > > m_ownedModules
 The modules we own.
ModuleNameNameToModuleDataMap m_nameToModuleMap
 Map from modules names to loaded ModuleData.

Detailed Description

Handles reloading modules and their dependents at runtime

Member Function Documentation

◆ GetLoadedModule()

AZStd::shared_ptr<ModuleDataImpl> AZ::ModuleManager::GetLoadedModule ( AZStd::string_view  modulePath)

Lookup module by name using the supplied modulePath parameter and return a ModuleData reference to it

modulePathbasename to a module to lookup within the executable directory if the modulePath has any path separators within it, the basename after the last separator is used
shared ptr to an ModuleData structure if the module is loaded and managed by the ModuleManager

◆ HandleDependencySortError()

void AZ::ModuleManager::HandleDependencySortError ( const Entity::DependencySortOutcome outcome)

On dependency sort errors, display error message with details. Additionally send the message to NativeUI (if available) and ask user what to do,

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