Пример #1
0
        public bool Save()
        {
            string savePathHeadset     = Application.persistentDataPath + "/AryzonHeadsetSettings.bfd";
            string savePathPhone       = Application.persistentDataPath + "/AryzonPhoneSettings.bfd";
            string savePathCalibration = Application.persistentDataPath + "/AryzonCalibrationSettings.bfd";

            if (File.Exists(savePathHeadset))
            {
                File.Delete(savePathHeadset);
            }
            if (File.Exists(savePathPhone))
            {
                File.Delete(savePathPhone);
            }
            if (File.Exists(savePathCalibration))
            {
                File.Delete(savePathCalibration);
            }

            bool ok = SerializeStatic.Save(typeof(Headset), savePathHeadset);

            ok = SerializeStatic.Save(typeof(Phone), savePathPhone);
            ok = SerializeStatic.Save(typeof(Calibration), savePathCalibration);

            if (!ok)
            {
                //Debug.Log ("Could not save settings");
            }
            else
            {
                //Debug.Log ("Saved settings to: " + savePathPhone);
            }

            return(ok);
        }
Пример #2
0
            static Headset()
            {
                //Debug.Log ("Loading headset settings");
                bool ok = SerializeStatic.Load(typeof(Headset), Application.persistentDataPath + "/AryzonHeadsetSettings.bfd");

                if (!ok)
                {
                    //Debug.Log ("Could not load headset settings");
                }
                else
                {
                    AryzonSettings.Instance.Apply();
                }
            }
Пример #3
0
            static Calibration()
            {
                //Debug.Log ("Loading calibration settings");
                bool ok = SerializeStatic.Load(typeof(Calibration), Application.persistentDataPath + "/AryzonCalibrationSettings.bfd");

                if (!ok)
                {
                    //Debug.Log ("Could not load calibration settings");
                }
                else
                {
                    AryzonSettings.Instance.Apply();
                }
            }
Пример #4
0
            static Phone()
            {
                //Debug.Log ("Loading phone settings");

                bool ok = SerializeStatic.Load(typeof(Phone), Application.persistentDataPath + "/AryzonPhoneSettings.bfd");

                if (!ok)
                {
                    //Debug.Log ("Could not load phone settings");
                }
                else
                {
                    AryzonSettings.Instance.Apply();
                }
            }