GrabDebugSnapshot error for Visual Logger

I am using the first person shooter template to test the Visual Logger. I am following the tutorial below but am getting an error in the MyCharacter.h and MyCharacter.cpp. I have included the VisualLogger.h file in MyCharacter.cpp.

The error XCode is giving me for MyCharacter.h is:
‘GrabDebugSnapshot’ marked ‘override’ but does not override any member function.

The error XCode is giving me for MyCharacter.cpp is:
No type named ‘GrabDebugSnapshot’ in ‘ACharacter’.

Any help is greatly appreciated! Thanks

Still haven’t been able to find the solution to this

I just ran into this too. It looks like the docs are out of date.

GrabDebugSnapshot() was moved to an interface. Here’s what I did to get it working:

In your header file:

…add this include…

#include "VisualLogger/VisualLoggerDebugSnapshotInterface.h"

…add this above your class declaration…

DECLARE_LOG_CATEGORY_EXTERN(MyLogCategory, Log, All);

…inherit from IVisualLoggerDebugSnapshotInterface…

class AMyCharacter : public ACharacter, public IVisualLoggerDebugSnapshotInterface

In your cpp file:

…add this include…

#include "VisualLogger/VisualLogger.h"

…add this just below your includes…

DEFINE_LOG_CATEGORY(MyLogCategory);

…add your UE_LOG calls whereever…

UE_VLOG(this, MyLogCategory, Verbose, TEXT("I did something"));

…remove the call to Super::GrabDebugSnapshot() from your GrabDebugSnapshot() function…

#if ENABLE_VISUAL_LOG
void AMyCharacter::GrabDebugSnapshot(FVisualLogEntry* Snapshot) const
{
	// Remove this --> Super::GrabDebugSnapshot(Snapshot)
	const int32 CatIndex = Snapshot->Status.AddZeroed();
	FVisualLogStatusCategory& PlaceableCategory = Snapshot->Status[CatIndex];
	PlaceableCategory.Category = TEXT("My Category");
	PlaceableCategory.Add(TEXT("My Character Class"), TEXT("Log some stuff"));
}
#endif

I hope that helps!

aaroncox1234 , many many thanks! It’s works.