UnrealModFramework
Mod framework API
Loading...
Searching...
No Matches
Mod::Loader::IModLoaderModule Class Referenceabstract

Loads approved cooked content in a game or editor PIE session. More...

#include <ModLoader.h>

Inheritance diagram for Mod::Loader::IModLoaderModule:

Public Member Functions

 DECLARE_MULTICAST_DELEGATE_ThreeParams (FOnLoadCompleted, ELoadOrigin, const FString &, TConstArrayView< FLoadResult >)
 Receives the origin, input path, and results of a finished load.
 DECLARE_MULTICAST_DELEGATE_OneParam (FOnBeforeUnload, const FMountedPackage &)
 Receives a mounted package while its content is still available.
virtual FLoadResult LoadPackage (const FString &Path, const FLoadPolicy &Policy)=0
 Verifies and mounts one archive on the game thread.
virtual TArray< FLoadResult > LoadDirectory (const FString &Directory, const FLoadPolicy &Policy)=0
 Mounts eligible .mod files directly inside a directory.
virtual TArray< FMountedPackage > GetMountedPackages () const =0
 Copies mounted packages that can be activated.
FOnLoadCompleted & OnLoadCompleted ()
 Gets the startup and manual completion event.
FOnBeforeUnload & OnBeforeUnload ()
 Gets the game-thread event for a package beginning unload.

Static Public Member Functions

static IModLoaderModule & Get ()
 Returns the service owned by the enabled ModLoader module.
static bool ReadGameplayRelease (FGameplayRelease &OutRelease)
 Resolves the host gameplay identity used for network admission.

Detailed Description

Loads approved cooked content in a game or editor PIE session.

Use from a game-thread startup gate. Loading performs synchronous I/O and engine mounts. Removing a watched source starts the unload of its package. PIE also releases mounts at the end of play.

Member Function Documentation

◆ Get()

IModLoaderModule & Mod::Loader::IModLoaderModule::Get ( )
static

Returns the service owned by the enabled ModLoader module.

Returns
The service, valid until module shutdown.

◆ GetMountedPackages()

virtual TArray< FMountedPackage > Mod::Loader::IModLoaderModule::GetMountedPackages ( ) const
pure virtual

Copies mounted packages that can be activated.

Returns
A snapshot sorted by mod ID.

Call on the game thread.

◆ LoadDirectory()

virtual TArray< FLoadResult > Mod::Loader::IModLoaderModule::LoadDirectory ( const FString & Directory,
const FLoadPolicy & Policy )
pure virtual

Mounts eligible .mod files directly inside a directory.

Parameters
DirectoryDirectory on the physical filesystem.
PolicyTrusted release policy for the current game.
Returns
One result per candidate, or a scan-level failure.

Call on the game thread. Different archives with the same mod ID in one scan are rejected before any version of that mod is mounted.

◆ LoadPackage()

virtual FLoadResult Mod::Loader::IModLoaderModule::LoadPackage ( const FString & Path,
const FLoadPolicy & Policy )
pure virtual

Verifies and mounts one archive on the game thread.

Parameters
PathPath to the .mod file on the physical filesystem.
PolicyTrusted release policy for the current game.
Returns
Mounted content or a recoverable failure.

◆ OnBeforeUnload()

FOnBeforeUnload & Mod::Loader::IModLoaderModule::OnBeforeUnload ( )
inline

Gets the game-thread event for a package beginning unload.

Returns
The event. The package reference is valid during the callback.

◆ OnLoadCompleted()

FOnLoadCompleted & Mod::Loader::IModLoaderModule::OnLoadCompleted ( )
inline

Gets the startup and manual completion event.

Returns
The event. Add and remove listeners on the game thread.

One broadcast per operation. A directory result has one entry per candidate, one scan error, or no entries if empty. Callback references are temporary. Reentrant and wrong-thread completions are deferred.


The documentation for this class was generated from the following file:
  • ModRuntime/Source/Runtime/ModLoader/Public/ModLoader.h