BlueprintReadOnly should not be used on private members?

I get the error:
C:/Users/Julien/Desktop/ToonTanks/Source/ToonTanks/Pawns/PawnTank.h(34) : LogCompile: Error: BlueprintReadOnly should not be used on private members
this is my code:


I tried to solve this error on my own for a really long time but I really don’t know how to fix this

2 Likes

Can you try and define the UPROPERTYies in the public section?

You have these under the private section. That means it’s only accessible to the class itself so it’s impossible for a blueprint to read it. You would need to put them under public or protected.

I believe the issue is that you’re spelling Access with one s instead of two on your UPROPERTY lines, Dan, Rob had mentioned that he put these under the private section (I’m not entirely sure I understand why), but for blueprints to access them you could use the meta tag even if they are under the private specifier.

1 Like

These don’t need t o be BlueprintReadOnly so you can drop that specifier and meta tag.

Privacy & Terms