private void SaveAudioSettings() { try { var obj = new AudioSettingsPersistence(sliderMusicVolume.value, sliderSoundFxVolume.value); var serialized = JsonConvert.SerializeObject(obj, Formatting.Indented); var path = GetPersistenceFilePath(); File.WriteAllText(path, serialized); Debug.LogFormat("Audio settings saved at: {0}", path); } catch (Exception ex) { Debug.LogWarningFormat("InputManager saving error: {0}", ex.Message); } }