Hello, I'm developing a game multiplatform (PC, Switch, Xbox, PS), and for practical reasons, I'd prefer to handle everything with my own save system, even the options and player preferences (resolution, fullscreen, audio volumes, etc.).
So I wonder if there's a way to disable entirely AC to save its own things, either on PlayerPrefs, Json, Xml, whatever. Just disabling entirely whatever file written or registry enter is called by AC.
Of course I'd like to keep the ConstantID for handling buttons and other status at runtime, but not saving them on file/settings.
I've read something in the manual about it, but it feels more like changing location (i.e. moving to another path or in another format) rather than avoiding AC to save stuff in general.
Any guidance for this scope?
Thanks
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
If you don't want to rely on AC at all for saving, you'd just need to avoid using AC's SavesList element, or the use of the Save: Save or load Action.
If you wanted to be extra-safe and disable the file-writing completely, you could implement a new IFileFormatHandler script (see the Manual's "Custom save formats and handling" chapter) and populate it with empty functions.
Thanks, I'll have a look. I'm not using any Save/Load Action, nor SavesList elements.
I meant specifically for settings. I noticed AC is saving PlayerPrefs if I change my sounds slider (even if I'm handling them with my own script, but maybe because in the Settings the exposed values are automatically connected to AC). And maybe some other PlayerPrefs are handled/saved by AC engine somehow, even if I don't call the save. I'm just wondering... But I'll have a look at the manual and do the empty functions trick for the save formats handler.
Hey Chris, I'm getting back after some time to this thread, to finally solve the thing.
So, I've followed the Manual for avoiding entirely AC to save stuff (especially Options/Settings into the registry, for Unity Player Prefs).
And this is what I did:
I created a script called "DisableAcSaving.cs" and I've attached it to the Persistent Engine prefab, with an Awake that does the following:
Then I've a class called OverrideAcSave, which is not attached to anything (it's just in the Assets folder), that basically override all the AC methods, but returning empty. This way:
Is that it? Do I risk to break everything this way? Having errors during the gameplay? Or is it good to go?
P.S. I'm not calling at any time any Save: Save or Load AC Action, and I'm storing my settings and whatnot on separate files, with my own classes and methods.
UPDATE
I get the following error:
NullReferenceException: Object reference not set to an instance of an object
AC.SaveSystem.GetNumSlots () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:1150)
Uhmm...
Replace:
with: