I made c++ class that uses ue4’s Actor as the parent. I am trying to make the variables usable within blueprints. Whenever I try to add any blueprint key words into UPROPERTY() it gives me a compiler error. I can use VisibleAnywhere, EditAnywhere, Category, etc, without any compiler errors at all.
Gives me compiler errors
#pragma once
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"
UCLASS()
class JUNGLE_DUNGEON_API AMyActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyActor();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Int")
int16 MyInt;
};
No Compiler errors
#pragma once
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"
UCLASS()
class JUNGLE_DUNGEON_API AMyActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyActor();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
UPROPERTY(EditAnywhere, Category = "Int")
int16 MyInt;
};
What am I doing wrong?