Auto Save
Posted: Tue Apr 28, 2020 6:40 pm
Hola,
So I'm really sorry for asking such an annoying question that could probably be googled (too noob to find the answer xd) & I'm still a beginner when it comes to coding.
ANYWAYS. So I was able to figure out how autosave works and was able to attach the script into my gameobject the thing is when I start the game and then close it I can see that the file path thingi gets updated but I have no idea how to load it afterwards. I have already checked around on the website and read the docs but for whatever reason I can't understand how keys work, is it something I'm supposed to add or is it something that's already added?
Basically what I'm trying to load is numbers that're stored in double, so I attached the auto save script to the gamemanager (where all my numbers are stored). So what I tried was adding a load into a void start in the same script which basically gave me this error: KeyNotFoundException: Key "GameManager" was not found in file ---- /SaveFile.es3". Use Load<T>(key, defaultValue) if you want to return a default value if the key does not exist.
Basically what I'm trying to ask is what key am I supposed to use or like am I supposed to create one or or orrr like what xD?
PS. Once again sorry for asking such a stupid question
- Squash
So I'm really sorry for asking such an annoying question that could probably be googled (too noob to find the answer xd) & I'm still a beginner when it comes to coding.
ANYWAYS. So I was able to figure out how autosave works and was able to attach the script into my gameobject the thing is when I start the game and then close it I can see that the file path thingi gets updated but I have no idea how to load it afterwards. I have already checked around on the website and read the docs but for whatever reason I can't understand how keys work, is it something I'm supposed to add or is it something that's already added?
Basically what I'm trying to load is numbers that're stored in double, so I attached the auto save script to the gamemanager (where all my numbers are stored). So what I tried was adding a load into a void start in the same script which basically gave me this error: KeyNotFoundException: Key "GameManager" was not found in file ---- /SaveFile.es3". Use Load<T>(key, defaultValue) if you want to return a default value if the key does not exist.
Basically what I'm trying to ask is what key am I supposed to use or like am I supposed to create one or or orrr like what xD?
PS. Once again sorry for asking such a stupid question
- Squash