Here are my classes:
SecretPlayerState.h
#pragma once
#include "GameFramework/PlayerState.h"
#include "SecretPlayerState.generated.h"
#include "Core.h"
UCLASS()
class SECRET_API ASecretPlayerState : public APlayerState{
GENERATED_BODY()
public:
ASecretPlayerState(const FObjectInitializer& ObjectInitializer);
UPROPERTY(BlueprintReadWrite, Category = "Attribute", EditAnywhere, Replicated)
int32 health;
};
SecretPlayerState.cpp
#include "Secret.h"
#include "SecretPlayerState.h"
#include "UnrealNetwork.h"
ASecretPlayerState::ASecretPlayerState(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer){
bReplicates = true;
health = 100;
}
void ASecretPlayerState::GetLifetimeReplicatedProps( TArray< FLifetimeProperty > & OutLifetimeProps ) const
{
DOREPLIFETIME( ASecretPlayerState, health);
}
This is the error i get:
:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Public\Net\UnrealNetwork.h(78): error C2653: 'FLogCategoryLogNet' : is not a class or namespace name
1>C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Public\Net\UnrealNetwork.h(78): error C2065: 'CompileTimeVerbosity' : undeclared identifier
1>C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Public\Net\UnrealNetwork.h(78): error C2065: 'LogNet' : undeclared identifier
There is more to this error but its huge