Forum rules - please read before posting.

Can I eliminate the use of playerprefs?

I'd like to take advantage of SteamCloud so I want to eliminate the games use of playerprefs. Any suggestions? Thanks John

Comments

  • Writing to PlayerPrefs is the default method of storing Options data. This can be overridden, however, by assigning an alternative iOptionsFileHandler class.

    See the Manual's "Custom save formats and handling" chapter. You can either create a new class to determine exactly where Options data is saved, or use the alternative OptionsFileHandler_SystemFile class provided by AC. This allows for Options data to instead be saved as application files, much like save files:

    AC.Options.OptionsFileHandler = new AC.OptionsFileHandler_SystemFile ();
    

    Place that in a C# script's Awake function, attach it to your PersistentEngine prefab, and that'll replace the use of PlayerPrefs.

  • Thanks will give it a try.

  • Hey, sorry for bumping this thread but i was looking around and haven't found the OptionsFileHandler_SystemFile in version 1.71.4
    Is it only in newer versions ?
    Thanks !

  • Yes - it was introduced in v1.72.0.

    If you can't update, you can import the latest AC into a fresh project and copy the file over.

  • Alright :) Thanks for the quick answer!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.