/// <summary> /// 仮想HMDドライバ設定をディスクへ書き込み /// </summary> /// <param name="data"></param> private static void Write_Default_VRSettings(default_vrsettings data) { var json = JsonUtility.ToJson(data, true); var path = Emviroment.Path.default_vrsettings; File.WriteAllText(path, json); }
/// <summary> /// 仮想HMDドライバ設定をディスクから読み込み /// </summary> /// <returns></returns> private static default_vrsettings Read_Default_VRSettings() { var data = new default_vrsettings(); var path = Emviroment.Path.default_vrsettings; if (File.Exists(path)) { var fileJson = File.ReadAllText(path); JsonUtility.FromJsonOverwrite(fileJson, data); } return(data); }