I assume I’m missing something, but how does one “save” games? (I mean as a player, not as a developer.)
It’s very game specific what and how to save things. There’s several systems that you can use: the PlayerPrefs class, writing directly to files, or accesing web-services with the WWW class.
If you describe a specific problem, you’re almost certain to get help on it.
Enjoy,
d.
I couldn’t find a file class. PlayerPrefs obviously sounds useful.
Where do I look for things like reading from/writing to files?
You use the .NET libraries; the cover that and a lot more (XML, advanced networking, regular expressions, database access, …).
The class you are looking for is called File and is documented here: File Class (System.IO) | Microsoft Learn
d.
Ah. I was hoping to avoid doing anything with .NET
Then use PlayerPrefs
d.
Hi,
I work with an adventure game creation system (WME) which simply dumps a memory state (all variables inside a running game). Perhaps Unity could stream this data to a disk or server?
Hi
This is a plugin I wrote to write/save directly to harddisk.
A script how to use it is included.
I hope this will help you (You need Unity Pro for Plugins)
By
(To use it drag the Folder “Plugins” into the Assets Folder of your project)
13477–449–$plugins_987.zip (6.78 KB)
You can read/write files and custom files to the harddisk with .net from within the Unity scripting without any plugins like David said.
It works really well.
-Jeremy