I’ve looked at a lot of forums regarding PlayerPrefs but nothing about inconsistent data loading. I’ve used a tutorial to store the transform and rotation of the player upon a save, and to load them back in when the scene loads. I know how PlayerPrefs work, and I’ve made (what should be) a simple loading/saving code, but I don’t know what I’ve done wrong which would make it so that it only loads in the position and rotation sometimes.
I’ve attached my code here, and the problem is that every time I load, there is around a 25% chance rotation OR position load, and a lower chance that NEITHER position or rotation load, and a high-ish chance position AND rotation load correctly.
What is it that I’m doing wrong? I feel like I’m going nuts, because sometimes it will work, and sometimes it won’t. I’m using LoadSceneMode.Single every time I need to Load data as well. I’m just so confused why sometimes parts of the data are missing or not referenced.