I have this variable inside a Weapon C++ code:
UPROPERTY(EditAnywhere,BlueprintReadWrite) uint8 AmmoCount;
And the C++ code does
AmmoCount -= 1;
everytime the weapon shoot.
The problem is that, if I set this from the editor let’s say to 50, then I hit Play and shoot 10 times, when I press ESC and go back to the editor, now the actual value in the blueprint has changed to 40.
There is a way to put a default value from the Editor for a UPROPERTY that is not going to change after a play session? (otherwise I have to manually set 50 projectile before hitting Play every time…)