I have created a custom save format that uses Json.NET from Newtonsoft (https://www.newtonsoft.com/json) to try to get rid of the quirks in the built in JSON file format handler.
I register it on awake according to section 9.9 in the manual:
SaveSystem.FileFormatHandler = new JsonFileFormatHandler();
Both saving and loading seem to work, but when I restart the app, the saved games aren't showing up in either the save or load game menu - both lists are empty.
Here's the code for my handler:
https://1drv.ms/t/s!Amz_vh8OYDX3u91tADhKBLy4kAbvyg?e=P7GElH
"Save in JSON format (experimental)" in settings manager is unchecked since I'm not using that one.
Thanks!
AC: 1.69.1
Unity: 2019.2.5
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I'm using Unity Prefab menus.
Here's a dump of the Saves list:
https://1drv.ms/u/s!Amz_vh8OYDX3u91v8nZ5VqJ3FSuoQA?e=h0wdz6
What are you saving to? System files or PlayerPrefs?
AC will detect files based on extension - in this case it should be ".json". In SaveSystem.cs, find the GetSaveExtension function and insert:
What is the Console output?
It may be that this function is called by AC before your custom format is assigned. If so, you could try moving the assign to an Awake function placed on the PersistentEngine prefab.
Yep, moving it to the PersistentEngine prefab solved it - thanks!