UnrealModFramework
Mod framework API
Loading...
Searching...
No Matches
UModExtensionLibrary Class Referencefinal

Registers generated extension callbacks for cooked Mod Blueprints. More...

#include <ModExtensionLibrary.h>

Inheritance diagram for UModExtensionLibrary:

Classes

struct  FBridge

Static Public Member Functions

static MODLOADER_API int32 RegisterModExtension (UModInstance *Owner, FName Id, FName Key, FName Function, EModExtensionStage Stage, EModExtensionOperation Operation, int32 Priority, const TArray< FString > &Before, const TArray< FString > &After, float CancelValue, FModExtensionToken &Token)
 Registers a synchronous function on the game thread.
static MODLOADER_API void UnregisterModExtension (UModInstance *Owner, const FModExtensionToken &Token)
 Requests unsubscription on the game thread.
static MODLOADER_API int32 ProvideModService (UModInstance *Owner, FName Id, FName TypeId, const FString &Signature, const FString &Version, FName Permission, UObject *Instance)
 Provides a named World service during On Mod Register.
static MODLOADER_API void WithdrawModService (UModInstance *Owner, FName Id)
 Revokes the named service when it is owned by this Mod.
static MODLOADER_API bool AcquireModService (UModInstance *Owner, FName Id, FName TypeId, const FString &Signature, int64 &Context, int64 &Object)
 Acquires a declared service for generated SDK calls.
static MODLOADER_API int32 NextModHook (UObject *Owner)
 Continues the current wrapping Hook with its existing input.
static MODLOADER_API int32 RegisterModBehavior (UObject &Owner, FName Id, const TCHAR *Signature, FName Function, EModExtensionStage Stage, FName SourceType)
 Registers an override against its published behavior contract.
static MODLOADER_API bool GetModBehaviorSource (UObject &Owner, FName TypeId, const TCHAR *Signature, FModPayloadObject &OutSource)
 Borrows the current callback's source through a published World interface.
static bool FindBehaviorObject (UObject &Owner, FName Alias, FName TypeId, bool bPlayerProvider, uint64 &Context, uint64 &Object)
 Finds an object or player provider allowed by the World policy.
static int32 BindBehaviorEvent (UModBehavior &Behavior, FName Id, const TCHAR *Signature, FName SourceType, const FModBehaviorEvent &Delegate, FModExtensionToken &Token)
 Binds a delegate through the World extension dispatcher.
static void UnbindBehaviorEvent (UModBehavior &Behavior, const FModExtensionToken &Token)
 Unsubscribes a delegate owned by the behavior.

Detailed Description

Registers generated extension callbacks for cooked Mod Blueprints.

Member Function Documentation

◆ AcquireModService()

MODLOADER_API bool UModExtensionLibrary::AcquireModService ( UModInstance * Owner,
FName Id,
FName TypeId,
const FString & Signature,
int64 & Context,
int64 & Object )
static

Acquires a declared service for generated SDK calls.

Parameters
OwnerThe current Mod instance.
IdThe service ID declared by the consuming package.
TypeIdThe generated World interface ID.
SignatureThe generated calling table signature.
ContextReceives the owner-bound context token.
ObjectReceives the revocable service object token.
Returns
Whether the service is available.

◆ NextModHook()

MODLOADER_API int32 UModExtensionLibrary::NextModHook ( UObject * Owner)
static

Continues the current wrapping Hook with its existing input.

Parameters
OwnerThe behavior instance running the Hook.
Returns
Zero on success or the host continuation error.

◆ ProvideModService()

MODLOADER_API int32 UModExtensionLibrary::ProvideModService ( UModInstance * Owner,
FName Id,
FName TypeId,
const FString & Signature,
const FString & Version,
FName Permission,
UObject * Instance )
static

Provides a named World service during On Mod Register.

Parameters
OwnerThe host-created instance that owns the provider.
IdThe service ID declared by consuming packages.
TypeIdThe generated World interface ID.
SignatureThe interface's generated service signature.
VersionThe provided service version in major.minor.patch form.
PermissionHost grant for the provider and consumers, or None.
InstanceThe service object implementing the generated interface.
Returns
Zero on success or a runtime extension error code.

◆ RegisterModExtension()

MODLOADER_API int32 UModExtensionLibrary::RegisterModExtension ( UModInstance * Owner,
FName Id,
FName Key,
FName Function,
EModExtensionStage Stage,
EModExtensionOperation Operation,
int32 Priority,
const TArray< FString > & Before,
const TArray< FString > & After,
float CancelValue,
FModExtensionToken & Token )
static

Registers a synchronous function on the game thread.

Parameters
OwnerThe host-created Mod instance.
IdStable generated Hook or Event ID.
KeyStable identifier within the owner and stage.
FunctionName of the matching Blueprint function.
StagePre, Post, On, or Event.
OperationThe requested change or observation.
PriorityLower values run first when unconstrained.
BeforeMod IDs this callback precedes.
AfterMod IDs that precede this callback.
CancelValueThe complete result on cancellation.
TokenReceives the subscription token on success.
Returns
Zero on success or a runtime extension error code.

◆ UnregisterModExtension()

MODLOADER_API void UModExtensionLibrary::UnregisterModExtension ( UModInstance * Owner,
const FModExtensionToken & Token )
static

Requests unsubscription on the game thread.

Parameters
OwnerThe Mod that owns the subscription.
TokenThe token returned by registration.

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