A game-thread Mod entry point owned by one game instance.
More...
#include <ModInstance.h>
|
|
MODLOADER_API UWorld * | GetWorld () const override |
| | Returns the extension World or the World of the owning game instance.
|
| MODLOADER_API FString | GetModId () const |
| | Returns this instance's active package ID on the game thread.
|
| MODLOADER_API bool | AcquireWorldAPI (FName TypeId, const TCHAR *Signature, uint64 &OutContext, uint64 &OutObject) |
| | Acquires a host-approved world provider on the game thread.
|
| MODLOADER_API bool | AcquireModService (FName ServiceId, FName TypeId, const TCHAR *Signature, uint64 &OutContext, uint64 &OutObject) |
| | Acquires a declared cross-Mod service on the game thread.
|
|
MODLOADER_API void | ExecuteOnModLoadCompleted (const FModLoadNotification &Result) |
| | Dispatches load completion to Blueprint or the C++ override.
|
|
MODLOADER_API void | ExecuteOnModBeforeUnload () |
| | Dispatches unload notification to Blueprint or the C++ override.
|
|
MODLOADER_API void | ExecuteOnModRegister () |
| | Dispatches the mod register callback to Blueprint or the native override.
|
|
MODLOADER_API void | ExecuteOnModBind () |
| | Dispatches the mod bind callback to Blueprint or the native override.
|
|
| static MODLOADER_API void * | ResolveHostAPI (const char *Module, const char *Symbol) |
| | Resolves a host API table query on the game thread.
|
|
| virtual void | OnModLoadCompleted (const FModLoadNotification &Result) |
| | Receives the result of a load operation on the game thread.
|
| MODLOADER_API void | ReceiveModLoadCompleted (const FModLoadNotification &Result) |
| | Blueprint event for a completed Mod load.
|
| virtual void | OnModBeforeUnload () |
| | Releases game state and references before this Mod is unloaded.
|
|
MODLOADER_API void | ReceiveModBeforeUnload () |
| | Blueprint event dispatched before this Mod's content is unloaded.
|
|
MODLOADER_API void | ReceiveModRegister () |
| | Registers this mod's extensions while its World is preparing.
|
|
virtual void | OnModRegister () |
| | Registers compiled C++ extensions before the World is ready.
|
|
MODLOADER_API void | ReceiveModBind () |
| | Acquires declared services after all providers register.
|
|
virtual void | OnModBind () |
| | Binds compiled C++ consumers after all providers are registered.
|
A game-thread Mod entry point owned by one game instance.
◆ AcquireModService()
| MODLOADER_API bool UModInstance::AcquireModService |
( |
FName | ServiceId, |
|
|
FName | TypeId, |
|
|
const TCHAR * | Signature, |
|
|
uint64 & | OutContext, |
|
|
uint64 & | OutObject ) |
Acquires a declared cross-Mod service on the game thread.
- Parameters
-
| ServiceId | A service required by the owning package. |
| TypeId | The generated service interface. |
| Signature | The caller's generated table signature. |
| OutContext | Receives a context owned by this Mod instance. |
| OutObject | Receives the revocable service token. |
- Returns
- True when the service is available and authorized.
◆ AcquireWorldAPI()
| MODLOADER_API bool UModInstance::AcquireWorldAPI |
( |
FName | TypeId, |
|
|
const TCHAR * | Signature, |
|
|
uint64 & | OutContext, |
|
|
uint64 & | OutObject ) |
Acquires a host-approved world provider on the game thread.
- Parameters
-
| TypeId | Stable identity of the requested provider. |
| Signature | The caller's generated calling table signature. |
| OutContext | Receives the session-owned context token. |
| OutObject | Receives the non-owning provider token. |
- Returns
- True when the host authorized and issued both tokens.
◆ GetModId()
| MODLOADER_API FString UModInstance::GetModId |
( |
| ) |
const |
Returns this instance's active package ID on the game thread.
- Returns
- The package ID, or an empty string outside the active lifetime.
◆ OnModBeforeUnload()
| virtual void UModInstance::OnModBeforeUnload |
( |
| ) |
|
|
inlineprotectedvirtual |
Releases game state and references before this Mod is unloaded.
Runs once per instance on the game thread while the Mod's content is still mounted. Call Super::OnModBeforeUnload to dispatch the event.
Reimplemented in UModTestPackageInstance.
◆ OnModLoadCompleted()
Receives the result of a load operation on the game thread.
- Parameters
-
| Result | The completed startup or manual load result. |
Call Super::OnModLoadCompleted to dispatch the Blueprint event.
◆ ReceiveModLoadCompleted()
Blueprint event for a completed Mod load.
- Parameters
-
| Result | The same load result passed to the C++ entry point. |
◆ ResolveHostAPI()
| MODLOADER_API void * UModInstance::ResolveHostAPI |
( |
const char * | Module, |
|
|
const char * | Symbol ) |
|
static |
Resolves a host API table query on the game thread.
- Parameters
-
| Module | Owning module in the generated SDK contract. |
| Symbol | Query symbol in that module. |
- Returns
- A borrowed symbol address, or null when unavailable.
The documentation for this class was generated from the following file: