So i have a health variable in the character and the same health variable is stored/updated in the game instance. If you die in a level, you have the option to quit or restart. If you restart, it takes you to the beginning of the current level, where the game instance health variable is reloaded. The problem is that when you die, your health variable is at zero, so the game instance restarts the level at zero, because that is what was stored.
I could, of course, have a regular private health variable just update at begin play, but there are pickups in levels that increase max health permanently in both the character and the game instance, so i cant do that.
How can the game instance health reset the current health variable to the current max health amount? Any help appreciated and i hope i made sense!