Hello,
I’ve managed to narrow it down to what seems to be a circular dependency issue.
To reproduce:
-
create a MyCharacter blueprint, add an int variable and set its default value
-
create a MyCharacter_Child blueprint, based on first blueprint
-
create an UMG widget with a button that when clicked, gets player character and tries to cast it to MyCharacter_Child
-
in MyCharacter blueprint, create that widget in BeginPlay
-
close project and reopen (you don’t even have to click play) - default value of int variable will be reset to 0 on child bp