Hey Guy’s
So I’m looking for Save\Load System by creating file of TXT or INI.
How I creating file on my… Desktop?
somebody can help me please?
My idea?
Is it good idea (Create file on TXT or INI for making Save and Load system)?
Hello
which stores information in the Windows Registry
Also check out Unity Wiki
and Unity Answers
Good Luck
Player prefs does not do saving and loading. It does allow you to have i think about a mb or 2 of data ( thats the limits for a web player ) which is intended to be used as preferences/settings.
I cannot recommend any plugin/package to do this from personal use, but i know of one anyways. http://www.anbsoft.com/middleware/ezs/index.htm
It does not indicate what format it uses.
But as far as if using a system like this is a good idea, You should consider the type of game your making.
If its a adventure, action, or rpg where theres alot of need of saving then you’d definitely want to do what your asking for and having a save system which writes files is most likely ideal.
If its a card, puzzle, or mario type platformer where progress is stored either with checkpoints in the game or on completing levels. Then you can probably get away with player prefs.
The other thing you might want to consider is your target. Mainly if your going to have this be a web game, you might want to make sure the process for writing/reading files is supported ( i do not know )
UP.
Umm BDev you are wrong about the playerprefs…I have almost completely writen an MMORPG, well MORPG, which saves everything, from inventory items to the players eye color…so you actually an use the playerprefs to save and load…
Heres how to do saving in JS:
PlayerPrefs.SetInt("Name HERE",variableInt);
PlayerPrefs.SetFloat("Name HERE",variableFloat);
PlayerPrefs.SetString("Name HERE",variableString);
Heres how to do Loading in JS:
var NewInt = PlayerPrefs.GetInt("Name HERE");
var NewFloat = PlayerPrefs.GetFloat("Name HERE");
var NewString = PlayerPrefs.GetString("Name HERE");
If you need to externalize your data and don’t want it to be in the registry, try some of the methods in System.IO.File, such as ReadAllLines() and WriteAllLines().
Yes TNX a lot but…
How can I create a file on TXT or on INI by scripting?
Yes TNX a lot but…
How can I create a file on TXT or on INI by scripting?
UP
In C#:
string filePath = @"C:\MyFolder\MyFile.txt";
string fileContent = "This is the content of your TXT";
System.IO.File.WriteAllText(filePath, fileContent)
Hi, I know this is an old thread, but if it’s useful for anybody the FileManagement asset allows to create, edit and save INI files very easily. Here is the documentation. FileManagement includes also an in-game file browser, and a lot of other useful features.
Best regards.