Trying to access a property causes blueprint runtime error

It’s very simple, if you have for example code like this:

//declararation of variable
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category = "MyCategory")
int someVar;

//get 
UFUNCTION(BlueprintCallable)
int getSomeVar() const { return someVar; } 

//set 
UFUNCTION(BlueprintCallable)
void setSomeVar(int var) { someVar = var; }

It should work after compile.

1 Like