public static void SaveHMU(HMUData data)
 {
     PlayerPrefs.SetFloat(PrefsTags.HMU_POSITION_X, data.Position.x);
     PlayerPrefs.SetFloat(PrefsTags.HMU_POSITION_Y, data.Position.y);
     PlayerPrefs.SetFloat(PrefsTags.HMU_POSITION_Z, data.Position.z);
     PlayerPrefs.SetFloat(PrefsTags.HMU_ROTATION_X, data.Rotation.x);
     PlayerPrefs.SetFloat(PrefsTags.HMU_ROTATION_Y, data.Rotation.y);
     PlayerPrefs.SetFloat(PrefsTags.HMU_ROTATION_Z, data.Rotation.z);
     PlayerPrefs.SetFloat(PrefsTags.HMU_ROTATION_W, data.Rotation.w);
     PlayerPrefs.Save();
 }
        // Load and returns calibration data from player prefs file
        private static HMUData LoadHMUCalibration()
        {
            var data = new HMUData();

            _isHMULoaded = true;

            float posx = GetFloat(PrefsTags.HMU_POSITION_X);
            float posy = GetFloat(PrefsTags.HMU_POSITION_Y);
            float posz = GetFloat(PrefsTags.HMU_POSITION_Z);

            float rotx = GetFloat(PrefsTags.HMU_ROTATION_X);
            float roty = GetFloat(PrefsTags.HMU_ROTATION_Y);
            float rotz = GetFloat(PrefsTags.HMU_ROTATION_Z);
            float rotw = GetFloat(PrefsTags.HMU_ROTATION_W);

            data.Position = new Vector3(posx, posy, posz);
            data.Rotation = new Quaternion(rotx, roty, rotz, rotw);

            return(data);
        }
 public HMUData(HMUData data)
 {
     this.Position = data.Position;
     this.Rotation = data.Rotation;
 }