I’m learning c++ at the moment. What I’m trying to do is create a grid in c++. but while I’m learning how to do it, I’m having to use flush persistent debug lines in the constructor of a blueprint child of the c++ actor. How would I code it in c++ so I don’t have to use a blueprint as I have notices overhead lag as it has to reference the blueprint every time I change the grid size variable.
.h file
public:
UFUNCTION(BlueprintCallable, Category=“Draw Debugs”)
void OutlineArea();
.cpp file
AInfinateGrid::AInfinateGrid()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;
GridSize = float (3500.f);
OutlineArea();
}
void AInfinateGrid::OutlineArea()
{
DrawDebugBox(GetWorld(),FVector(0.f, 0.f, 1.f), FVector(GridSize, GridSize, 0.f), FColor::Red, true);
}
The unreal engine 4 documentation says
void FlushPersistentDebugLines
(
const UWorld * InWorld
)
As I’m a beer short of a six pack, how would one put the flush persistent debug lines in the OutlineArea function.
Thank you
Stocker