class UMagesLiveScenegraphSubsystem

Overview

#include <MagesLiveScenegraphSubsystem.h>

class UMagesLiveScenegraphSubsystem: public UGameInstanceSubsystem
{
public:
    // fields

    FString CurrentLesson = "";
    int32 CurrentStageIndex = -1;
    FString LastActionName;

    // methods

    virtual void Initialize(FSubsystemCollectionBase& Collection);

    void SetupActionAnalytics(
        class ABasePrototype* Action,
        class UMagesAnalyticsAsset* Asset
        ) const;

    void CreateAction(
        const UObject* WorldContextObject,
        struct FLatentActionInfo LatentInfo,
        FString ActionName,
        TSubclassOf<ABasePrototype> ActionClass,
        UMagesAnalyticsAsset* Analytics = nullptr
        );

    void SkipAction();
    bool UndoAction();
    void Perform(ABasePrototype* ActionToPerform);
    class AMagesSceneGraph* GetGraph();
    class UMagesConfig* GetConfig();
    ABasePrototype* GetCurrentAction();
    FString GetCurrentActionName();
    void BindEvent(FString EventName, FSceneGraphEventDelegate Delegate);
    void InvokeEvent(FString EventName);
    void UnbindEvent(FString EventName);
    void AddActionAfterPerform(FSceneGraphChangeDelegate Delegate);
    void AddActionOnPerform(FSceneGraphChangeDelegate Delegate);
    void AddActionAfterUndo(FSceneGraphChangeDelegate Delegate);
    void AddActionOnUndo(FSceneGraphChangeDelegate Delegate);
    bool IsPlaying() const;
    TArray<FActionGroup> GetActionGroups();
    FMagesActionNode* FindAction(FString ActionName);
    void PerformByServer();
    void UndoByServer();
    static TArray<FString> GetActionGroupNames(FActionGroup Group);
};

Detailed Documentation

Methods

void SetupActionAnalytics(
    class ABasePrototype* Action,
    class UMagesAnalyticsAsset* Asset
    ) const

SceneGraph Modification

void CreateAction(
    const UObject* WorldContextObject,
    struct FLatentActionInfo LatentInfo,
    FString ActionName,
    TSubclassOf<ABasePrototype> ActionClass,
    UMagesAnalyticsAsset* Analytics = nullptr
    )

Create a new action

ABasePrototype* GetCurrentAction()

Returns current action actor instance

FString GetCurrentActionName()

Returns current action name (defined inside SceneGraph Object

void BindEvent(FString EventName, FSceneGraphEventDelegate Delegate)

SceneGraph Event Handling Bind an event