Files
UnrealEngine/Engine/Plugins/Runtime/nDisplay/Source/DisplayCluster/Public/Misc/DisplayClusterTickableGameObject.h
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

45 lines
966 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Tickable.h"
/**
* Tickable game object: has an OnTick() callback to start all subscribers
*/
class DISPLAYCLUSTER_API FDisplayClusterTickableGameObject : public FTickableGameObject
{
public:
FDisplayClusterTickableGameObject() = default;
virtual ~FDisplayClusterTickableGameObject() = default;
public:
/** Callback on tick **/
DECLARE_EVENT_OneParam(FDisplayClusterTickableGameObject, FTickEvent, float);
FTickEvent& OnTick()
{
return TickEvent;
}
virtual bool IsTickableInEditor() const override
{
return true;
}
virtual void Tick(float DeltaTime) override;
virtual ETickableTickType GetTickableTickType() const override
{
return ETickableTickType::Always;
}
virtual TStatId GetStatId() const override
{
RETURN_QUICK_DECLARE_CYCLE_STAT(FDisplayClusterTickableGameObject, STATGROUP_Tickables);
}
private:
FTickEvent TickEvent;
};