A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
UGameManager Class ReferenceBlueprintable

Manager for managing player experience, accepts various events such as player teleportation, and can be expanded with properties that allow access to actors on the level. More...

#include <GameManager.h>

Inheritance diagram for UGameManager:
[legend]

Public Member Functions

 UGameManager ()
 
 DECLARE_EVENT_HANDLER (UInitializationEvent)
 
 DECLARE_EVENT_HANDLER (UNewStepLoadedEvent)
 
 DECLARE_EVENT_HANDLER (UNewStoryLoadedEvent)
 
APlayerControllerGetPrivateOwner () const
 
void HandleEvent (UBaseEvent *Event)
 
void OnNewStepLoaded (const FText &StepName)
 Function for overriding. Called when a new step is loaded.
 
void OnNewStoryLoaded (const FText &StepName)
 Function for overriding. Called when a new story is loaded.
 
void OnTeleportActivatedRaw (EControllerHand Hand, bool InActivate)
 Function for overriding. Called when teleportation is activated.
 
template<typename TEventType , typename... TInitializeArgs>
void SendEvent (TInitializeArgs... Arguments)
 
void SetPrivateOwner (APlayerController *Owner)
 

Public Attributes

FText CurrentStep
 UPROPERTY(BlueprintReadWrite, Category = "GameManager")
 
AGameModeBaseGameModeBaseRef
 UPROPERTY(BlueprintReadWrite, Category = "GameManager")
 
bool IsUsingStoryScriptData = false
 UPROPERTY(EditDefaultsOnly, Category = "GameManager|Script")
 
APixoVRCharacterPlayerPawnRef
 UPROPERTY(BlueprintReadWrite, Category = "GameManager")
 
TArray< FScriptInstanceDataScriptInstancesData
 UPROPERTY(BlueprintReadOnly, Category = "GamaManager|Script")
 
USoundManagerSoundManagerRef
 UPROPERTY(BlueprintReadWrite, Category = "GameManager")
 
UStoryManagerStoryManagerRef
 UPROPERTY(BlueprintReadWrite, Category = "GameManager")
 
UStoryScriptClassDataStoryScriptClassData
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameManager|Script")
 

Protected Member Functions

void HandleEvent_Impl (class UBaseEvent *Event)
 

Protected Attributes

THandlers Handlers
 

Private Types

using THandler = TFunction<void(UBaseEvent*)>
 
using THandlerKey = UClass*
 
using THandlers = std::unordered_map<THandlerKey, THandler, THandlerHash, THandlerComp>
 

Private Member Functions

 GENERATED_BODY ()
 

Private Attributes

APlayerControllerPrivateOwner
 UPROPERTY()
 

Detailed Description

Manager for managing player experience, accepts various events such as player teleportation, and can be expanded with properties that allow access to actors on the level.

UCLASS(Blueprintable)

Definition at line 20 of file GameManager.h.

Member Typedef Documentation

◆ THandler

using UBaseManager::THandler = TFunction<void(UBaseEvent*)>
privateinherited

Definition at line 56 of file BaseManager.h.

◆ THandlerKey

using UBaseManager::THandlerKey = UClass*
privateinherited

Definition at line 55 of file BaseManager.h.

◆ THandlers

using UBaseManager::THandlers = std::unordered_map<THandlerKey, THandler, THandlerHash, THandlerComp>
privateinherited

Definition at line 74 of file BaseManager.h.

Constructor & Destructor Documentation

◆ UGameManager()

UGameManager::UGameManager ( )

Definition at line 12 of file GameManager.cpp.

Member Function Documentation

◆ DECLARE_EVENT_HANDLER() [1/3]

UGameManager::DECLARE_EVENT_HANDLER ( UInitializationEvent )

◆ DECLARE_EVENT_HANDLER() [2/3]

UGameManager::DECLARE_EVENT_HANDLER ( UNewStepLoadedEvent )

◆ DECLARE_EVENT_HANDLER() [3/3]

UGameManager::DECLARE_EVENT_HANDLER ( UNewStoryLoadedEvent )

◆ GENERATED_BODY()

UGameManager::GENERATED_BODY ( )
private

◆ GetPrivateOwner()

APlayerController * UBaseManager::GetPrivateOwner ( ) const
inlineinherited

Definition at line 47 of file BaseManager.h.

Here is the caller graph for this function:

◆ HandleEvent()

void UBaseManager::HandleEvent ( UBaseEvent * Event)
inherited

Definition at line 11 of file BaseManager.cpp.

◆ HandleEvent_Impl()

void UBaseManager::HandleEvent_Impl ( class UBaseEvent * Event)
protectedinherited

Definition at line 24 of file BaseManager.cpp.

◆ OnNewStepLoaded()

void UGameManager::OnNewStepLoaded ( const FText & StepName)
BlueprintImplementableEvent

Function for overriding. Called when a new step is loaded.

Parameters
StepNameThe name of the newly loaded step.

UFUNCTION(BlueprintImplementableEvent, Category = "GameManager")

◆ OnNewStoryLoaded()

void UGameManager::OnNewStoryLoaded ( const FText & StepName)
BlueprintImplementableEvent

Function for overriding. Called when a new story is loaded.

Parameters
StepNameThe name of the first loaded step in this story.

UFUNCTION(BlueprintImplementableEvent, Category = "GameManager")

◆ OnTeleportActivatedRaw()

void UGameManager::OnTeleportActivatedRaw ( EControllerHand Hand,
bool InActivate )
BlueprintNativeEvent

Function for overriding. Called when teleportation is activated.

Parameters
HandHand by which teleport was executed
InActivateIndicates whether the teleportation is being activated (true when showing teleport circle, false when executing teleport).

UFUNCTION(BlueprintNativeEvent, Category = "GameManager")

◆ SendEvent()

template<typename TEventType , typename... TInitializeArgs>
void UBaseManager::SendEvent ( TInitializeArgs... Arguments)
inlineinherited

Definition at line 40 of file BaseManager.h.

◆ SetPrivateOwner()

void UBaseManager::SetPrivateOwner ( APlayerController * Owner)
inlineinherited

Definition at line 46 of file BaseManager.h.

Member Data Documentation

◆ CurrentStep

FText UGameManager::CurrentStep
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "GameManager")

The current step name.

Definition at line 68 of file GameManager.h.

◆ GameModeBaseRef

AGameModeBase* UGameManager::GameModeBaseRef
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "GameManager")

Reference to the GameModeBase.

Definition at line 92 of file GameManager.h.

◆ Handlers

THandlers UBaseManager::Handlers
protectedinherited

Definition at line 77 of file BaseManager.h.

◆ IsUsingStoryScriptData

bool UGameManager::IsUsingStoryScriptData = false
EditDefaultsOnly

UPROPERTY(EditDefaultsOnly, Category = "GameManager|Script")

Flag indicating whether the StoryScriptClassData is being used.

Definition at line 106 of file GameManager.h.

◆ PlayerPawnRef

APixoVRCharacter* UGameManager::PlayerPawnRef
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "GameManager")

Reference to the PixoVRCharacter.

Definition at line 86 of file GameManager.h.

◆ PrivateOwner

APlayerController* UBaseManager::PrivateOwner
privateinherited

UPROPERTY()

Definition at line 53 of file BaseManager.h.

◆ ScriptInstancesData

TArray<FScriptInstanceData> UGameManager::ScriptInstancesData
BlueprintReadOnly

UPROPERTY(BlueprintReadOnly, Category = "GamaManager|Script")

Array of script instance data.

Definition at line 112 of file GameManager.h.

◆ SoundManagerRef

USoundManager* UGameManager::SoundManagerRef
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "GameManager")

Reference to the StoryManager/

Definition at line 74 of file GameManager.h.

◆ StoryManagerRef

UStoryManager* UGameManager::StoryManagerRef
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "GameManager")

Reference to the StoryManager.

Definition at line 80 of file GameManager.h.

◆ StoryScriptClassData

UStoryScriptClassData* UGameManager::StoryScriptClassData
EditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GameManager|Script")

The data asset containing the script class data. Setup this if you are using story scripts

Definition at line 99 of file GameManager.h.


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