I do not use the "Application.persistentDataPath + " method.Īlso, "pathWithoutFileName" is given a string "CPUSellerSimulatorData/". which is counter-intuitive why would it throw a "DirectoryNotFound" exception when it was trying to CHECK if it can be found or not? It happened when the program was trying to check if that directory exists. On the logs, it said that there was no such directory when it was trying to make one. I also noticed on the build folder that there is a new folder called CPUSellerSimulatorData, and I suspect that would've been where it would've saved it if I coded it correctly.Īnd when I deleted the file on %appdata%/./LocalLow/DefaultCompany/CPU Manufacturer Simulator/CPUSellerSimulatorData/SaveGame.sav, the system just refuses to work entirely.Īnd no, it does not save there for some reason. When I built it, it loads the savefile from %appdata%/./LocalLow/DefaultCompany/CPU Manufacturer Simulator/CPUSellerSimulatorData/SaveGame.sav. That will make the MonoBehaviour class aware of the coroutine's existence, so it knows it needs to continue it each frame. You should use StartCoroutine(SaveTheGame(true)) every time you call a coroutine. However, you don't use StartCoroutine when you trigger this coroutine, so the code will run up until it reaches a "yield return" statement and then just never pick it up again. You have a coroutine (SaveTheGame) whose purpose seems to be to save data every 30 seconds. It seems like you're trying to do a singleton pattern, and if so, you should just use _current = this MoneyManager holds data, SerializationManager saves and loads the data, what is the purpose of SaveData? (I'm pretty sure you can just delete it) SY No one is playing the blame game, LARRY. (SaveData.Start is called, which adds a new SaveData component, which causes Start() to be called, which adds a new.) The only thing I can imagine is that you must not have one of these in the scene at all? So you may just not be using it? And I don't really see what its purpose is. The boy who is listening to the transistor radio-DANNY Gopnik-sits at a hinge-topped desk in a cinderblock. For one, SaveData also seems to.create a copy of itself with AddComponent? What's going on there? I'm actually not sure how line 40 there isn't hard-freezing Unity. Load ( "someSaveData.dat" ) as MoneyData
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |