UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FModuleDescriptor Struct Reference

#include <ModuleDescriptor.h>

Public Member Functions

PROJECTS_API FModuleDescriptor (const FName InName=NAME_None, EHostType::Type InType=EHostType::Runtime, ELoadingPhase::Type InLoadingPhase=ELoadingPhase::Default)
 
PROJECTS_API bool Read (const FJsonObject &Object, FText *OutFailReason=nullptr)
 
PROJECTS_API bool Read (const FJsonObject &Object, FText &OutFailReason)
 
PROJECTS_API void Write (TJsonWriter<> &Writer) const
 
PROJECTS_API void UpdateJson (FJsonObject &JsonObject) const
 
PROJECTS_API bool IsCompiledInConfiguration (const FString &Platform, EBuildConfiguration Configuration, const FString &TargetName, EBuildTargetType TargetType, bool bBuildDeveloperTools, bool bBuildRequiresCookedData, const FString &Architecture=FString()) const
 
PROJECTS_API bool IsCompiledInCurrentConfiguration () const
 
PROJECTS_API bool IsLoadedInCurrentConfiguration () const
 

Static Public Member Functions

static PROJECTS_API bool ReadArray (const FJsonObject &Object, const TCHAR *Name, TArray< FModuleDescriptor > &OutModules, FText *OutFailReason=nullptr)
 
static PROJECTS_API bool ReadArray (const FJsonObject &Object, const TCHAR *Name, TArray< FModuleDescriptor > &OutModules, FText &OutFailReason)
 
static PROJECTS_API void WriteArray (TJsonWriter<> &Writer, const TCHAR *ArrayName, const TArray< FModuleDescriptor > &Modules)
 
static PROJECTS_API void UpdateArray (FJsonObject &JsonObject, const TCHAR *ArrayName, const TArray< FModuleDescriptor > &Modules)
 
static PROJECTS_API void LoadModulesForPhase (ELoadingPhase::Type LoadingPhase, const TArray< FModuleDescriptor > &Modules, TMap< FName, EModuleLoadResult > &ModuleLoadErrors)
 
static PROJECTS_API void UnloadModulesForPhase (ELoadingPhase::Type LoadingPhase, const TArray< FModuleDescriptor > &Modules, TMap< FName, EModuleUnloadResult > &OutErrors, bool bSkipUnload=false, bool bAllowUnloadCode=true)
 
static PROJECTS_API bool CheckModuleCompatibility (const TArray< FModuleDescriptor > &Modules, TArray< FString > &OutIncompatibleFiles)
 

Public Attributes

FName Name
 
EHostType::Type Type
 
ELoadingPhase::Type LoadingPhase
 
TArray< FString > PlatformAllowList
 
TArray< FString > PlatformDenyList
 
TMap< FString, TArray< FString > > PlatformArchitectureAllowList
 
TMap< FString, TArray< FString > > PlatformArchitectureDenyList
 
TArray< EBuildTargetTypeTargetAllowList
 
TArray< EBuildTargetTypeTargetDenyList
 
TArray< EBuildConfigurationTargetConfigurationAllowList
 
TArray< EBuildConfigurationTargetConfigurationDenyList
 
TArray< FString > ProgramAllowList
 
TArray< FString > ProgramDenyList
 
TArray< FString > GameTargetAllowList
 
TArray< FString > GameTargetDenyList
 
TArray< FString > AdditionalDependencies
 
bool bHasExplicitPlatforms
 

Detailed Description

Description of a loadable module.

Constructor & Destructor Documentation

◆ FModuleDescriptor()

FModuleDescriptor::FModuleDescriptor ( const FName  InName = NAME_None,
EHostType::Type  InType = EHostType::Runtime,
ELoadingPhase::Type  InLoadingPhase = ELoadingPhase::Default 
)

Normal constructor

Member Function Documentation

◆ CheckModuleCompatibility()

bool FModuleDescriptor::CheckModuleCompatibility ( const TArray< FModuleDescriptor > &  Modules,
TArray< FString > &  OutIncompatibleFiles 
)
static

Checks that all modules are compatible with the current engine version. Returns false and appends a list of names to OutIncompatibleFiles if not.

◆ IsCompiledInConfiguration()

bool FModuleDescriptor::IsCompiledInConfiguration ( const FString &  Platform,
EBuildConfiguration  Configuration,
const FString &  TargetName,
EBuildTargetType  TargetType,
bool  bBuildDeveloperTools,
bool  bBuildRequiresCookedData,
const FString &  Architecture = FString() 
) const

Tests whether the module should be built for the given target

◆ IsCompiledInCurrentConfiguration()

bool FModuleDescriptor::IsCompiledInCurrentConfiguration ( ) const

Tests whether the module should be built for the current engine configuration

◆ IsLoadedInCurrentConfiguration()

bool FModuleDescriptor::IsLoadedInCurrentConfiguration ( ) const

Tests whether the module should be loaded for the current engine configuration

◆ LoadModulesForPhase()

void FModuleDescriptor::LoadModulesForPhase ( ELoadingPhase::Type  LoadingPhase,
const TArray< FModuleDescriptor > &  Modules,
TMap< FName, EModuleLoadResult > &  ModuleLoadErrors 
)
static

Loads all the modules for a given loading phase. Returns a map of module names to load errors

◆ Read() [1/2]

bool FModuleDescriptor::Read ( const FJsonObject Object,
FText OutFailReason 
)

Reads a descriptor from the given JSON object

◆ Read() [2/2]

bool FModuleDescriptor::Read ( const FJsonObject Object,
FText OutFailReason = nullptr 
)

Reads a descriptor from the given JSON object

◆ ReadArray() [1/2]

bool FModuleDescriptor::ReadArray ( const FJsonObject Object,
const TCHAR Name,
TArray< FModuleDescriptor > &  OutModules,
FText OutFailReason 
)
static

Reads an array of modules from the given JSON object

◆ ReadArray() [2/2]

bool FModuleDescriptor::ReadArray ( const FJsonObject Object,
const TCHAR Name,
TArray< FModuleDescriptor > &  OutModules,
FText OutFailReason = nullptr 
)
static

Reads an array of modules from the given JSON object

◆ UnloadModulesForPhase()

void FModuleDescriptor::UnloadModulesForPhase ( ELoadingPhase::Type  LoadingPhase,
const TArray< FModuleDescriptor > &  Modules,
TMap< FName, EModuleUnloadResult > &  OutErrors,
bool  bSkipUnload = false,
bool  bAllowUnloadCode = true 
)
static

Unloads all the modules for a given loading phase. Returns a map of module names to load errors. bSkipUnload can be used to simulate unloading

◆ UpdateArray()

void FModuleDescriptor::UpdateArray ( FJsonObject JsonObject,
const TCHAR ArrayName,
const TArray< FModuleDescriptor > &  Modules 
)
static

Updates an array of module descriptors in the specified JSON field (indexed by module name)

◆ UpdateJson()

void FModuleDescriptor::UpdateJson ( FJsonObject JsonObject) const

Updates the given json object with values in this descriptor

◆ Write()

void FModuleDescriptor::Write ( TJsonWriter<> &  Writer) const

Writes a descriptor to JSON

◆ WriteArray()

void FModuleDescriptor::WriteArray ( TJsonWriter<> &  Writer,
const TCHAR ArrayName,
const TArray< FModuleDescriptor > &  Modules 
)
static

Writes an array of modules to JSON

Member Data Documentation

◆ AdditionalDependencies

TArray<FString> FModuleDescriptor::AdditionalDependencies

List of additional dependencies for building this module.

◆ bHasExplicitPlatforms

bool FModuleDescriptor::bHasExplicitPlatforms

When true, an empty PlatformAllowList is interpeted as 'no platforms' with the expectation that explict platforms will be added in plugin extensions

◆ GameTargetAllowList

TArray<FString> FModuleDescriptor::GameTargetAllowList

List of allowed game targets

◆ GameTargetDenyList

TArray<FString> FModuleDescriptor::GameTargetDenyList

List of disallowed game targets

◆ LoadingPhase

ELoadingPhase::Type FModuleDescriptor::LoadingPhase

When should the module be loaded during the startup sequence? This is sort of an advanced setting.

◆ Name

FName FModuleDescriptor::Name

Name of this module

◆ PlatformAllowList

TArray<FString> FModuleDescriptor::PlatformAllowList

List of allowed platforms

◆ PlatformArchitectureAllowList

TMap<FString,TArray<FString> > FModuleDescriptor::PlatformArchitectureAllowList

List of allowed platform architectures

◆ PlatformArchitectureDenyList

TMap<FString,TArray<FString> > FModuleDescriptor::PlatformArchitectureDenyList

List of disallowed platform architectures

◆ PlatformDenyList

TArray<FString> FModuleDescriptor::PlatformDenyList

List of disallowed platforms

◆ ProgramAllowList

TArray<FString> FModuleDescriptor::ProgramAllowList

List of allowed programs

◆ ProgramDenyList

TArray<FString> FModuleDescriptor::ProgramDenyList

List of disallowed programs

◆ TargetAllowList

TArray<EBuildTargetType> FModuleDescriptor::TargetAllowList

List of allowed targets

◆ TargetConfigurationAllowList

TArray<EBuildConfiguration> FModuleDescriptor::TargetConfigurationAllowList

List of allowed target configurations

◆ TargetConfigurationDenyList

TArray<EBuildConfiguration> FModuleDescriptor::TargetConfigurationDenyList

List of disallowed target configurations

◆ TargetDenyList

TArray<EBuildTargetType> FModuleDescriptor::TargetDenyList

List of disallowed targets

◆ Type

EHostType::Type FModuleDescriptor::Type

Usage type of module


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