Class UZagalaSpecExecutionContextSubsystem#
Defined in File ZagalaSpecExecutionContextSubsystem.h
Inheritance Relationships#
Base Type#
public UEngineSubsystem
Class Documentation#
-
class UZagalaSpecExecutionContextSubsystem : public UEngineSubsystem#
Engine subsystem that owns the current scenario execution context.
Execution context building
-
static TObjectPtr<UObject> BuildExecutionContext(TObjectPtr<UObject> Scenario, UClass *ContextClass)#
Creates an execution context of the specified type for a scenario and sets it up.
Note: This is the connection between a feature config and the context execution of one of its scenarios. This method transforms config data into a runtime context, which is then used to execute the scenario’s expectations.
- Parameters:
Scenario – The scenario from where to create the context.
ContextClass – The class of context it needs to build.
- Returns:
A pointer to the created context.
-
static TObjectPtr<UObject> BuildExecutionContext(const FGameplayTag &ScenarioTag, UClass *ContextClass)#
Resolves the scenario registered under ScenarioTag in UZagalaSpecFeatureSettings and builds its execution context.
- Parameters:
ScenarioTag – The gameplay tag of the scenario.
ContextClass – The class of context it needs to build.
- Returns:
A pointer to the created context, or nullptr if the scenario or class is invalid.
Public Static Functions
-
static UZagalaSpecExecutionContextSubsystem *Get()#
Returns the engine subsystem instance.
- Returns:
The subsystem, or nullptr when the engine is unavailable.
-
static void CreateExecutionContext(UClass *ContextClass)#
Clears the current execution context and replaces it with a new instance of ContextClass.
- Parameters:
ContextClass – The class of the execution context to create.
-
static void ClearCurrentExecutionContext()#
Marks the current execution context as garbage and clears it.
-
static TObjectPtr<UObject> GetCurrentExecutionContext()#
Returns the current execution context.
- Returns:
The current context, or nullptr when none exists.
-
static void SetupContext(TObjectPtr<UObject> Context, TObjectPtr<UObject> Scenario)#
Sets up Context with the feature’s shared context extensions, the scenario’s context extensions, and its expectations.
- Parameters:
Context – Object implementing IZagalaSpecExecutionContext to set up.
Scenario – Object implementing IZagalaSpecScenarioInterface that provides the steps.
-
static TObjectPtr<UObject> BuildExecutionContext(TObjectPtr<UObject> Scenario, UClass *ContextClass)#