In my Main menu scene are upgrade buttons for health etc. These change the variables in another script and it works. My problem is, that these variables are resetting if the scene loads, where you play the game. Is there any method to save these variables without them resetting after each scene load?
//Player's Stat's
[System.NonSerialized] public float
//Things I want so save
playerHp = 100,
MaxPlayerHp = 100f,
playerDmg = 1f,
critDmgMultiplier = 0.5f,
critChance = 20f,
money = 0f,
highscore = 0,
MinPlayerHp = 0f,
HpDecreasePerSec = 15f,
HpBackOnHit = 0f,
HpBackOnKill = 20f,
score = 0;
}