- Home /
Question by
Kim-Nobre · May 15, 2019 at 03:39 PM ·
save databinaryformatter
Binary formatter problem
I made a simple save system to save data from a scriptable object:
public void SaveGame()
{
BinaryFormatter formatter = new BinaryFormatter();
FileStream file = File.Create(SaveFile);
string data = JsonUtility.ToJson(savedData);
formatter.Serialize(file, data);
file.Close();
}
It is working, but there is a problem.
When I open the saved file using Sublime Text I get the correct result: But when I open it with any other text editor, this is what I get: Why doesn't it work with other text editors? And how can I fix this?
sublimetextfile.png
(43.6 kB)
notepadfile.png
(13.6 kB)
Comment