Hello,
I’ve been working on saving data in my game but there is one huge problem I’ve come across. Basically whenever I set an int or a float or anything else and the key hasn’t been set yet it returns zero regardless of whether or not I set a default variable. I ran a test variable and set it to a unmade key as follows:
public int test;
void Awake()
{
test = PlayerPrefs.SetInt("testagcfsvd", 1);
}
the variable “test” reads 0, despite the key never having been created or even saved.
I know there’s got to be something I’m doing wrong but I’ve been at this for hours. Has something been changed in a recent update or am I just making on obvious mistake?