edited December 2014 in ORK Scripting
Hi,

I have a question about saving custom data. I'm putting together an ORK Framework integration package for the Dialogue System for Unity. The Dialogue System can save and restore its state from a C# string. What's the best way to get this string included in ORK's save/load system?

The only thing I've found so far is to actually modify GameHandler.cs to add calls to a custom ISaveData object. Is there an event I can hook into or message I can listen for? Ideally I'd just hook into a public event like "OnLoadGame" or "OnSaveGame". Or, if there's a message, I could use it store the string as an ORK variable just prior to saving the game.
  • If it's just a string, it's probably easiest to just store it into a string game variable in ORK and ORK will handle everything.

    A system for saving/loading custom data without modifying the code is on my to-do list, but havn't yet come to that :)
    Will make it a higher priority!
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks! What's the best way to know when a game is about to be saved, so I can generate the string and save it as a game variable? And what's the best way to know when a game has just been loaded, so I apply that variable to the Dialogue System?
  • I don't think that's currently possible, unless you only handle saving via the event system (e.g. for autosaving).

    I'll add the new custom save data support in the next update, probably best to wait for that :)
    Will do a small update next week, most likely Friday.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Sounds great. I'll keep an eye out for it. Thanks again!
Sign In or Register to comment.