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

Prepares and owns the extension plan for a single game World. More...

#include <ModExtensionSubsystem.h>

Inheritance diagram for UModExtensionSubsystem:

Public Member Functions

MODAPI_API bool DefineContentSlot (FName Id, Mod::Extension::FContentSlot Slot)
 Defines a content slot on the game thread before Prepare.
MODAPI_API bool RegisterAnchor (FName Id, ULevel &Level, const FTransform &Transform, FName Permission, Mod::Extension::FPatchAnchorRules Rules={})
 Registers an anchor on the game thread.
MODAPI_API void RemoveAnchor (FName Id, ULevel &Level)
 Releases one anchor's effects at a game-thread safe point.
MODAPI_API TOptional< Mod::Extension::FPatchOrigin > GetPatchOrigin (const UObject &Effect) const
 Reports the provenance of a tracked Patch Actor or component.
MODAPI_API Mod::Extension::FPatchData ResolvePatchData (FName Anchor, FName DataId) const
 Reads active Patch data and provenance on the game thread.
MODAPI_API bool Prepare (Mod::Extension::FWorldPolicy Policy, FString &OutError)
 Prepares mounted extensions on the game thread.
MODAPI_API bool IsReady () const
 Reports whether this World may start extension-aware gameplay.
MODAPI_API FString GetGameplayDigest () const
 Returns the published plan digest on the game thread, or an empty ID.
MODAPI_API TMap< FString, FString > GetPackageRevisions () const
 Copies the selected package revisions for game save metadata.
MODAPI_API Mod::Extension::FWorldFailure GetFailure () const
 Returns the terminal extension failure on the game thread, if any.
MODAPI_API void SetFailureHandler (Mod::Extension::FOnWorldFailure Handler)
 Installs a game-thread callback for the terminal failure of this World.
MODAPI_API bool MatchesGameplayDigest (const FString &Digest) const
 Returns whether this World accepted an authoritative plan digest.
MODAPI_API Mod::Extension::FResolvedContent ResolveContent (FName Slot, FName Id) const
 Reads the selected content and its source on the game thread.
MODAPI_API TModResult< Mod::Extension::FSubscription > Register (UModInstance &Owner, FName Id, const FString &Signature, Mod::Extension::FHandler Handler)
 Registers a callback for the current mod and returns its revocation token.
MODAPI_API void Unregister (UModInstance &Owner, const Mod::Extension::FSubscription &Token)
 Requests ordinary unsubscription at the next game-thread safe point.
MODAPI_API Mod::Extension::ESubscriptionStatus GetSubscriptionStatus (const UModInstance &Owner, const Mod::Extension::FSubscription &Token) const
 Reports the token's publication state on the game thread.
MODAPI_API TModResult< void > Provide (UModInstance &Owner, const Mod::Extension::FService &Service, UObject *Instance)
 Publishes a service from this mod's registration callback.
MODAPI_API void Withdraw (UModInstance &Owner, FName Id)
 Revokes the named service owned by this mod on the game thread.
MODAPI_API TModResult< Mod::API::FObjectBinding > Bind (UModInstance &Consumer, FName Id, FName TypeId, const TCHAR *Signature)
 Obtains a generated, revocable service binding on the game thread.
MODAPI_API uint32 ReflectNativeMod (const FString &ModId, const UMF_NativeReflectionRequestV2 &Request, UMF_NativeReflectionReplyV2 &Reply)
 Inspects one active native Mod's own objects on the Game Thread.
MODAPI_API void Stop ()
 Stops entry and releases resources once in-flight callbacks return.
Mod::API::EError RegisterBlueprintBehavior (UObject &Owner, FName Id, const TCHAR *Signature, FName Function, Mod::Extension::EStage Stage, FName SourceType)
 Registers a Blueprint behavior override during World preparation.
bool GetBlueprintBehaviorSource (UObject &Owner, FName TypeId, const TCHAR *Signature, FModPayloadObject &OutSource)
 Returns the active behavior callback's opaque source view.
bool FindBlueprintBehaviorObject (UObject &Owner, FName Alias, FName TypeId, bool bPlayerProvider, uint64 &Context, uint64 &Object)
 Finds a behavior target through the game-authored World alias policy.
Mod::API::EError BindBlueprintBehaviorEvent (UModBehavior &Behavior, FName Id, const TCHAR *Signature, FName SourceType, const FModBehaviorEvent &Delegate, FModExtensionToken &Token)
 Registers a delegate on an authorized behavior.
void UnbindBlueprintBehaviorEvent (UModBehavior &Behavior, const FModExtensionToken &Token)
 Removes a registration belonging to the behavior.
Mod::API::EError ContinueBlueprintBehavior (UObject &Owner)
 Invokes the active synchronous Blueprint Wrap continuation.

Friends

class UModAPIHostSubsystem
class Mod::Extension::FModNetworkHandshake
class Mod::Extension::FModExtensionSave

Detailed Description

Prepares and owns the extension plan for a single game World.

Member Function Documentation

◆ DefineContentSlot()

MODAPI_API bool UModExtensionSubsystem::DefineContentSlot ( FName Id,
Mod::Extension::FContentSlot Slot )

Defines a content slot on the game thread before Prepare.

Parameters
IdStable slot identifier.
SlotHost defaults and allowed operations.
Returns
Whether the slot was installed.

◆ Prepare()

MODAPI_API bool UModExtensionSubsystem::Prepare ( Mod::Extension::FWorldPolicy Policy,
FString & OutError )

Prepares mounted extensions on the game thread.

Parameters
PolicyGrants and explicit content winner choices for this World.
OutErrorFailure reason when preparation closes the World plan.
Returns
Whether the game can open its gameplay gate.

◆ ReflectNativeMod()

MODAPI_API uint32 UModExtensionSubsystem::ReflectNativeMod ( const FString & ModId,
const UMF_NativeReflectionRequestV2 & Request,
UMF_NativeReflectionReplyV2 & Reply )

Inspects one active native Mod's own objects on the Game Thread.

Parameters
ModIdThe admitted Mod owning the object and reflection code.
RequestA V2 request with bounded caller-owned input.
ReplyThe destination buffer and number of bytes returned.
Returns
A native extension status.

◆ RegisterAnchor()

MODAPI_API bool UModExtensionSubsystem::RegisterAnchor ( FName Id,
ULevel & Level,
const FTransform & Transform,
FName Permission,
Mod::Extension::FPatchAnchorRules Rules = {} )

Registers an anchor on the game thread.

Parameters
IdStable anchor identifier.
LevelOwning level in this World.
TransformThe spawn transform for admitted patches.
PermissionHost grant required to use the anchor.
RulesEffects the host allows at this anchor.
Returns
Whether the anchor and required patches were accepted.

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