Hi together,
I want to process data from Recast in a Actor Subclass. In detail i want to process rcCompactHeightfield Data. So i tried to include Recast.h and it is found though my class won`t compile. How could i possibly circumvent this problem?
Actor Header:
#pragma once
#include "GameFramework/Actor.h"
#include "Runtime/Navmesh/Public/Recast/Recast.h"
#include "Runtime/Navmesh/Public/Recast/RecastAlloc.h"
#include "Runtime/Navmesh/Public/Recast/RecastAssert.h"
#include "MyProcessor.generated.h"
UCLASS()
class MYPROJECT_API AMyProcessor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyProcessor();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
virtual void PostLoad() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
void Process(rcCompactHeightfield& RasterContext);
};
Actor cpp:
#include "MyProject.h"
#include "MyProcessor.h"
// Sets default values
AMyProcessor::AMyProcessor()
{
// 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;
}
// Called when the game starts or when spawned
void AMyProcessor::BeginPlay()
{
Super::BeginPlay();
UE_LOG(LogTemp, Warning, TEXT("MyProcessor spawned"));
}
void AMyProcessor::PostLoad()
{
Super::PostLoad();
UE_LOG(LogTemp, Warning, TEXT("MyProcessor loaded"));
}
// Called every frame
void AMyProcessor::Tick( float DeltaTime )
{
Super::Tick( DeltaTime );
}
void Process(rcCompactHeightfield& RasterContext)
{
}
Error:
Info /Users/leonardodapisa/Desktop/fork/UnrealEngine/Engine/Source/Runtime/Navmesh/Public/Recast/Recast.h:108:1: error: expected expression
Info public:
Info ^
Info /Users/leonardodapisa/Desktop/fork/UnrealEngine/Engine/Source/Runtime/Navmesh/Public/Recast/Recast.h:106:19: error: variable has incomplete type 'class NAVMESH_API'
Info class NAVMESH_API rcContext
Info ^
Obviously he has problem with the “NAVMESH_API” and so do i since i don`t understand at the moment where it is coming from.
Thanks in advance,