Application.persistentDataPath saving game in Chinese?
Hello Community,
I'm not sure if it's related to the user's language, but it only happens to him/her.
I released a game shortly, and I'm not sure if this is something that happens to all the Chinese PC users, but, when the game tries to create a save file it manages to create it, but it's empty. (When I create a new game save, it weights 4kb).
This is the first part of the code that creates that saves the file. Not sure if you need the whole rest, it's pretty big...
I'm guessing it could be something related to the file saving the date as well? I'm literally lost here. I have no idea about Chinese culture, dates, or languages. I don't even know if this is something that happens to other users.
public void SaveGame()
{
//If the player hasn't reached the library, we don't save. This will hopefully prevent the bug that made imposible for the player to pass through BTW if it has gotten the spell but not destroyed the boulder and finally and either quit the game or had a system failure for some reason.
//Needs to be tested
if (!CheckPointOverrider.Instance.LibraryReached && !newGameStarted)
{
return;
}
if (currentSlotPlaying == 0)
{
return;
}
BinaryFormatter bf = new BinaryFormatter ();
FileStream file = File.Open (Application.persistentDataPath + "/GameSlot" + currentSlotPlaying.ToString() + ".dat", FileMode.OpenOrCreate);
SavingSlot slotSave = new SavingSlot();
slotSave.DateTime = System.DateTime.Now.ToString();
Debug.Log(slotSave.DateTime);
If anyone knows about this, it'll be very helpfull.
Thanks.