static LevelPresetData() { _save = MyPlayerPrefs.GetObject(saveKey, new LevelPresetSaveable()); MyPlayerPrefs.OnSave += () => MyPlayerPrefs.SetObject(saveKey, _save); }
static void InitData() { settings = MyPlayerPrefs.GetObject(prefsKey, new AudioSettings()); MyPlayerPrefs.OnSave += () => MyPlayerPrefs.SetObject(prefsKey, settings); }