private void Awake() { if (Application.isEditor) { if (_scriptableData == null) { _scriptableData = ScriptableDataUtils.TryLoadScriptableFromJSON <ExampleScriptableData>(_path); } } else { try { _scriptableData = ScriptableDataUtils.LoadScriptableFromJSON <ExampleScriptableData>(_path); } catch (FileNotFoundException e) { Debug.Log($"Saved data for {_scriptableData} not found. {e}"); } } }
private void SaveData() { ScriptableDataUtils.SaveScriptableToJSON(_path, _scriptableData); }