Download

Can't see default values of a class variables when trying to access them with blueprints

Hello,

I am new here, so sorry if it is stupid. I am creating a class in C++ and I am adding some properties with UPROPERTY(EditAnywhere, BlueprintReadWrite). But if I create a Blueprint class out of the C++ class I can’t access any of the variables anyway. Right know I am following a video tutorial here: https://www.youtube.com/watch?v=9vy5iw3Mu4U&index=2&list=PLgwhqR8QlpRVKQ5JEWcdjV77lex0q-Oth and at one point the guy in the video is spawning a new actor he created in C++ with a Blueprint function Spawn Actor From Class. I have rewatched the video many times and I am sure I did everything exactly the same, but when I choose the class to spawn I once again get no variables to set.

This is a part of the Class I am working with now (though the problem persists with other classes too. I just thought that I was doing something wrong):

VoxelActor.h: [SPOILER]

class CRAFT_API AVoxelActor : public AActor
{
GENERATED_BODY()

public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray <UMaterialInterface*> Materials;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ExponseOnSpawn = true))
    int32 randomSeed = 0;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ExponseOnSpawn = true))
    int32 voxelSize = 200;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ExponseOnSpawn = true))
    int32 chunkLineElements = 10;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ExponseOnSpawn = true))
    int32 chunkXindex = 0;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (ExponseOnSpawn = true))
    int32 chunkYindex = 0;

…[/SPOILER]

I am even setting some default values in VoxelActor.cpp:

[SPOILER]

void AVoxelActor::OnConstruction(const FTransform & Transform)
{
chunkZElements = 80;
chunkLineElementsP2 = chunkLineElements * chunkLineElements;
chunkTotalElements = chunkLineElementsP2 * chunkZElements;
voxelSizeHalf = voxelSize / 2;

[/SPOILER]

Sorry if I am not making myself clear.

Cheers.