Page 1 of 1

ES3.KeyExists is Not Working?

Posted: Mon Apr 12, 2021 11:45 pm
by white
Sorry, I’m not good at English.

I have released a game for PC, and many people are playing it without any problems.

But, some people have commented that it is not possible to save and load game data in a Windows 32bit environment.
When I got Player.Log, it seems that the phenomenon that the key that should exist cannot be found at ES3.KeyExists.

Is it possible that the processing of ES3.KeyExists may be strange depending on the specifications of the PC?

Re: ES3.KeyExists is Not Working?

Posted: Tue Apr 13, 2021 7:56 am
by Joel
Hi there,

I've had no other reports of this, and the specification of the PC shouldn't make a difference. Please could you let me know how you've determined that ES3.KeyExists is not working?

All the best,
Joel

Re: ES3.KeyExists is Not Working?

Posted: Fri Apr 16, 2021 1:28 am
by white
I'm sorry, the user's report was inaccurate and I suspected ES3.KeyExists.

When I got Player.Log of the corresponding part, when ES3.Save was executed,

UnauthorizedAccessException access to the path "C: Program Files \ ~ \ SaveFile.es3.tmp" is denied.

I found that the above error was occurring.

The situation after this is unclear, but users have reported that the save data will disappear, and it is presumed that a blank SaveFile.es3 has been generated or deleted.

However, only a few percent of all users report this issue, so it's likely that it's due to the PC environment.

Is there anything that can be a hint for a solution?

Re: ES3.KeyExists is Not Working?

Posted: Fri Apr 16, 2021 6:46 am
by Joel
Hi there,

UnauthorizedAccessExceptions are thrown by the OS so are not something we have control over at our end, but indicates that the location being stored to doesn't have the required write permissions.

The only place guaranteed to be writable at runtime is Application.persistentDataPath, but it looks like you might have changed the storage location to Application.dataPath, as Application.persistentDataPath doesn't point to a directory within Program Files.

All the best,
Joel

Re: ES3.KeyExists is Not Working?

Posted: Mon Apr 19, 2021 12:56 am
by white
Thank you for your reply.

Certainly I am using dataPath.

Since it is not realistic to change the save location in released games, I decided to use persistentDataPath as a backup.