I have a load section on my start menu. How would I take the save information and put it into a 3d text/button that you can click on to load. It needs to put the name of the save, the time played, and levels completed into the 3d text. I’ll probably use 3 different texts and set them under a single parent to hold all of the seperate data pieces.
Would I have to take each piece of information and put it into a variable in the save script and then print it out to the 3d text? Can someone give me a script for this. Please give me some help. My last idea didn’t work.
I haven’t actually gotten to this point yet, but this requires using PlayerPrefs (I also am a bit confused on how to use them) to save and load the data. Also - just a future reference - if you want to load into a level in progress, you would need a state management system of pretty much every changeable object in the level(s).
Just to give a bit of info while you/we wait for more info by others
Please, at least try to do it yourself. If your tries doesn’t work, come here with a specific question about why your own script didn’t work and learn from there. Post snippets of your code so we could help you more. However, don’t expect people to do your job.
No, it doesn’t. PlayerPrefs is a fine way to save trivial data, such as what level the palyer has unlocked, but it’s not really suitable for anything more than that. As their name suggests, they’re intended for storing preferences.
You’ve got a huge amount of the Mono/.NET library at your disposal. I suggest looking into System.IO and things like File and Directory.
You could either program your own or buy one of the many save/load systems on the asset store. Then (somewhere in the game) save specific data and on your Main screen do something like the following:
I do wish that the Unity docs and official tutes made it clearer that there’s plenty of useful stuff available in the built-in runtime aside from Unity’s own API. They certainly don’t hide it, but I’ve personally not seen anything to nudge newbies towards checking it out.
Because it doesn’t always work and is not fully supported on all platform. Outside Windows, .NET access rely on how well Mono is integrated. Unity’s API is expected to work - outside normal bugs - on all the platforms they support. Frankly, it’s a bit annoying to have to search around to know if this bit of Mono is supported or not, and on which platform, so I tend to go seek solution on Unity’s API first.
For example, using System.IO on the editor usually works fine, but may not work at all once you deploy a game. Some platform simply don’t allow it. Kind of a game breaker if you need to load stuff. When it comes to serialization, I found AssetDatabase, Resources and AssetBundles to be great for the task. Not perfect, minds you, they got the same issue that any serialization has in Unity, but they do the job.
Yes, but there’s documentation to point you towards to handle that, too.
Speaking generally I’ve rarely had problems with the standard library, and in any case finding platform appropriate solutions for your needs is a part of life in cross-platform development. Speaking more specifically, I’ve only had one problem in my long history of using System.IO over a variety of platforms, and that was in regards to a free space query rather than reading or writing a file (which has always worked 100% as expected).
Not being familiar with the full range of tools at your disposal is just making life harder than it needs to be.