Limen Framework 0.1 Help

ALimenGameplayManager

Overview

ALimenGameplayManager is an abstract, blueprintable class derived from AInfo. It provides a framework for managing gameplay logic associated with specific game modes or contexts. The class includes methods for initializing, binding game modes, registering actors, and handling notifications. Derived classes should implement game-specific logic using the provided virtual functions and Blueprint extension points.

Properties

Type

Name

Access

Description

TMap<FGameplayTag, TFunction<void(AActor*)>>

ActorsRegistrations

Private

A map of gameplay tag to registration function for actors.

TWeakObjectPtr<AGameModeBase>

GameModeWeakPtr

Protected

A weak pointer to the associated game mode.

bool

bHasInitialized

Private

Indicates whether the manager has been initialized.

Functions

Return Type

Signature

Description

ALimenGameplayManager*

GetGameplayManager(UObject* WorldContextObject, TSubclassOf

ManagerClass)

Retrieves a gameplay manager instance of the specified class from the given world context.

template<typename ManagerClass>

GetGameplayManager(UObject* WorldContextObject)

Retrieves an instance of the specified gameplay manager class for the given world context.

explicit ALimenGameplayManager(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get())

Constructor

Initializes a new instance of ALimenGameplayManager.

virtual void PostInitializeComponents()

Override

Called after all components have been initialized.

void BindGameMode(AGameModeBase* InGameMode)

Public

Binds the specified GameMode instance to this gameplay manager.

virtual void NotifyActorRegistry(const FGameplayTag& Id, AActor* Actor)

Override

Notifies registered actors about a specific event or tag.

bool HasInitialized() const

Public

Checks whether the gameplay manager has been initialized.

AGameModeBase* GetGameMode() const

Public

Retrieves the GameMode associated with this Gameplay Manager.

virtual void RegisterActors(TMap<FGameplayTag, TFunction<void(AActor*)>>& OutRegistrations)

Override

Registers actors based on gameplay tags.

void AddOrReplaceRegistration(const FGameplayTag& Id, const TFunction<void(AActor*)>& RegistrationFunction)

Public

Adds or replaces a registration function for a specific tag.

template<typename T>

AddOrReplaceRegistration(const FGameplayTag& Id, const TFunction<void(T*)>& RegistrationFunction)

Template version of AddOrReplaceRegistration for specific types.

template<typename T>

AddOrReplaceRegistration(const FGameplayTag& Id, TWeakObjectPtr

* OutPtr) | Template version ofAddOrReplaceRegistration` using weak pointers.

template<typename RegisteredActorType, typename ObjectType>

AddOrReplaceRegistration(const FGameplayTag& Id, ObjectType* Object, TMemFunPtrType<false, ObjectType, void(RegisteredActorType*)>::Type RegistrationFunction)

Template version of AddOrReplaceRegistration with member function pointers.

virtual void Start()

Override

Starts the gameplay manager logic.

virtual bool CanStart() const

Override

Determines whether this instance of the gameplay manager can start.

UFUNCTION(BlueprintImplementableEvent)

BP_Start()

Blueprint event triggered when the gameplay manager is initialized and its logic has started.

Usage & Implementation Notes

  • The class uses a weak pointer for the game mode to avoid strong references that could prevent garbage collection.

  • The PostInitializeComponents method ensures the manager is initialized correctly or destroyed if it cannot start.

  • The RegisterActors method can be overridden by derived classes to register specific actors based on gameplay tags.

  • The AddOrReplaceRegistration methods provide flexibility in registering and managing actor notifications.

22 May 2026