Hello,
in my Plugin I’ve got a Object which inherits from UObject. It’s name is Watcher. Inside Watcher.h I declared a USTRUCT FMyStruct. The struct consists of some FVectors.
Then I’ve got another Object inherited from UObject called Tracer.
Watcher has a member of type Tracer. I want Tracer to do LineTraces , so i declared a method with Parameter MyStruct.
Inside Watcher.h I included Tracer.h .
Inside Tracer.h I included Watcher.h .
Compiler can’t resolve type of parameter FMyStruct in void Trace(…) .
I’ve tried different includes. None worked for me.
How do I include properly?
#include "Tracer.h"
#include "Watcher.generated.h"
USTRUCT()
struct FMyStruct
{
GENERATED_BODY()
.............................................
};
UCLASS()
class UWatcher : public UObject
{
GENERATED_BODY()
private:
FMyStruct values;
UTracer* tracer;
};
Tracer.h
#include "Watcher.h"
#include "Tracer.generated.h"
UCLASS()
class UTracer : public UObject
{
GENERATED_BODY()
private:
FHitResult Hitresult;
void Trace(FMyStruct values);
.................................................
};