static public T LoadOrDie <T>(string _filename, bool _persistent = false, string _obfuscated = "") where T : RaqnStorable, new() { T _pd = RaqnStorage.LoadJson <T>(SecureDataPath() + "/" + _filename, _persistent, _obfuscated, true); if (_pd == null) { Debug.LogError("Could not load PlayData: " + _filename); UnityEngine.Application.Quit(); } return(_pd); }
static public T LoadOrCreate <T>(string _filename, bool _persistent = false, string _obfuscated = "") where T : RaqnStorable, new() { T _pdc; _pdc = RaqnStorage.LoadJson <T>(SecureDataPath() + "/" + _filename, _persistent, _obfuscated, true); if (_pdc == null) { _pdc = new T(); _pdc.Save <T>(_filename); } return(_pdc); }
static public T Load <T>(string _filename, bool _persistent = false, string _obfuscated = "") where T : RaqnStorable, new() { return(RaqnStorage.LoadJson <T>(SecureDataPath() + "/" + _filename, _persistent, _obfuscated, true)); }