Skip to content

TScholaEnvironment

Template wrapper that bridges Blueprint-implementable interfaces to the type-erased IScholaEnvironment.

This template allows Blueprint-implemented environments to be used through the generic IScholaEnvironment interface, enabling polymorphic environment handling in C++.

template <typename T>
class TScholaEnvironment : public TScriptInterface<T>, public IScholaEnvironment

Methods

TScholaEnvironment

~TScholaEnvironment() = default

Virtual destructor for proper cleanup.


TScholaEnvironment

inline TScholaEnvironment(UObject *InObject)

Construct a typed environment wrapper from a UObject.

Parameters

  • InObject (UObject)

InitializeEnvironment

inline virtual void InitializeEnvironment(
TMap<FString, FInteractionDefinition> &OutAgentDefinitions) override

Initialize the environment through the Blueprint interface.

Parameters

  • OutAgentDefinitions (TMap<FString, FInteractionDefinition>)

SeedEnvironment

inline virtual void SeedEnvironment(int Seed) override

Set the random seed through the Blueprint interface.

Parameters

  • Seed (int)

SetEnvironmentOptions

inline virtual void
SetEnvironmentOptions(const TMap<FString, FString> &Options) override

Set environment options through the Blueprint interface.

Parameters

  • Options (const TMap<FString, FString>)

Reset

inline virtual void
Reset(TMap<FString, FInitialAgentState> &OutAgentState) override

Reset the environment through the Blueprint interface.

Parameters

  • OutAgentState (TMap<FString, FInitialAgentState>)

Step

inline virtual void
Step(const TMap<FString, TInstancedStruct<FPoint>> &InActions,
TMap<FString, FAgentState> &OutAgentStates) override

Execute a step through the Blueprint interface.

Parameters

  • InActions (const TMap<FString, TInstancedStruct<FPoint>>)

  • OutAgentStates (TMap<FString, FAgentState>)

Source: Source/ScholaTraining/Public/Environment/EnvironmentInterface.h