Tick in cheat manager?


I’m trying to do some work with cheat manager, like dumping every frame a property of X actor.
Cheat manager doesn’t have any tick function, so the solution i’ve got for the moment is Cheat manager command set a bool in the X actor, who will dump everytick the variable.

Is there a better way ?
Thanks !

Hi! Is it necessary to do it every tick? For example if you lock some property value you just can add setter method and add locking logic in it. Can you share some more details?

Hello, it’s just should be updated in real time (or near realtime).

If you want a full explanation :

I want to get for example Arms Position, so get basically the world position, and display it with a print.
I’am asking for tick as it’s usefull to have it updated everyframe for debugging purpose.

The difficulty is by the way not to display the value, but having something who is updated near everytick by the cheat manager.

You can make your cheat manager a tickable object

#pragma once

#include "CoreMinimal.h"

#include "Tickable.h"
#include "Engine/Engine.h"
#include "GameFramework/CheatManager.h"

#include "TickingCheatManager.generated.h"

UCLASS(Blueprintable, BlueprintType)

class UTickingCheatManager : public UCheatManager, public FTickableGameObject

  //~ Begin FTickableGameObject interface
  virtual TStatId GetStatId() const override
  virtual bool IsTickable() const override
    return true;

  virtual void Tick(float DeltaTime) override;
  //~ End FTickableGameObject interface

inline void UTickingCheatManager::Tick(float DeltaTime)
  GEngine->AddOnScreenDebugMessage(0, 0, FColor::Green, FString::SanitizeFloat(DeltaTime));

This is perfect dude, thanks so much !