UnrealModFramework
Mod framework API
Loading...
Searching...
No Matches
ModLoader.h File Reference
#include "Containers/Array.h"
#include "Containers/Map.h"
#include "Containers/Set.h"
#include "Containers/UnrealString.h"
#include "Delegates/Delegate.h"
#include "Misc/Optional.h"
#include "ModPackageExtensions.h"
#include "Templates/SharedPointer.h"
#include "Modules/ModuleInterface.h"
#include "UObject/NameTypes.h"

Go to the source code of this file.

Classes

struct  Mod::Loader::FPackageSelection
 Host selection applied before mounting or freezing a session. More...
struct  Mod::Loader::FGameplayRelease
 Shared release identity assigned by the host to specific archive bytes. More...
struct  Mod::Loader::FLoadPolicy
 Admission and trust settings supplied by the game. More...
struct  Mod::Loader::FMountedPackage
 Content described by a mounted mod package. More...
struct  Mod::Loader::FPackageSessionLease
 Keeps extension admission fixed while a GameInstance has a live session. More...
struct  Mod::Loader::FLoadResult
 Outcome for one input path, including its mounted content on success. More...
class  Mod::Loader::IModLoaderModule
 Loads approved cooked content in a game or editor PIE session. More...

Enumerations

enum class  Mod::Loader::ELoadOrigin : uint8 { Startup , Manual , DirectoryWatch }
 Identifies the entry point that finished a load. More...
enum class  Mod::Loader::ELoadError : uint8 {
  None , WrongThread , Busy , InvalidPolicy ,
  InputUnavailable , InvalidArchive , Incompatible , Untrusted ,
  LimitExceeded , TimedOut , IntegrityFailure , CacheFailure ,
  Conflict , BackendUnavailable , InvalidContainer , MountFailed ,
  RestartRequired , NotSelected , PlanRejected
}
 Stable results for package preparation and mounting. More...

Functions

MODLOADER_API bool Mod::Loader::ResolvePackageOrder (TConstArrayView< const FMountedPackage * > Candidates, const FPackageSelection &Selection, TArray< int32 > &OutOrder, FString &OutError)
 Resolves a package set in dependency order.
MODLOADER_API FString Mod::Loader::HashPackagePlan (const FString &CanonicalPlan)
 Hashes canonical UTF-8 plan data with SHA-256.

Enumeration Type Documentation

◆ ELoadError

enum class Mod::Loader::ELoadError : uint8
strong

Stable results for package preparation and mounting.

Enumerator
None 

Content is mounted.

WrongThread 

The call did not run on the game thread.

Busy 

A load is already in progress.

InvalidPolicy 

The host release policy is incomplete or invalid.

InputUnavailable 

The installed package directory or archive could not be read.

InvalidArchive 

The archive, manifest, or index is malformed or unsupported.

Incompatible 

The package does not match the host release or supported features.

Untrusted 

The host allowlist or required grants rejected the archive.

LimitExceeded 

The package set exceeds a loader limit.

TimedOut 

The preparation time budget was exhausted.

IntegrityFailure 

A payload does not match its declared digest.

CacheFailure 

The verified cache could not be prepared.

Conflict 

A mod identity, package root, or container collides.

BackendUnavailable 

The host does not expose the required container backend.

InvalidContainer 

Native container metadata is invalid or outside the mod namespace.

MountFailed 

The engine could not make the contents available.

RestartRequired 

Engine mount state requires a process restart.

NotSelected 

This candidate was excluded by the host's package selection.

PlanRejected 

The host could not prepare the selected dependency graph.

◆ ELoadOrigin

enum class Mod::Loader::ELoadOrigin : uint8
strong

Identifies the entry point that finished a load.

Enumerator
Startup 

The configured scan at game or PIE startup.

Manual 

An explicit LoadPackage or LoadDirectory call.

DirectoryWatch 

A package found by the mod directory watch.

Function Documentation

◆ ResolvePackageOrder()

MODLOADER_API bool Mod::Loader::ResolvePackageOrder ( TConstArrayView< const FMountedPackage * > Candidates,
const FPackageSelection & Selection,
TArray< int32 > & OutOrder,
FString & OutError )

Resolves a package set in dependency order.

Parameters
CandidatesVerified package records in arbitrary order.
SelectionHost filters, requirements and exact pins.
OutOrderIndices of the selected records in load order.
OutErrorConflict or dependency details when resolution fails.
Returns
Whether the entire selected plan is consistent.