Browse Source

add debug for recordings

Kenkart 2 years ago
parent
commit
a37d58cace
1 changed files with 17 additions and 0 deletions
  1. 17 0
      Assets/Scripts/ViveInput.cs

+ 17 - 0
Assets/Scripts/ViveInput.cs

@@ -67,6 +67,11 @@ public class ViveInput : MonoBehaviour
         {
             csvTime += Time.deltaTime;
         }
+
+        if (Input.GetKeyDown(KeyCode.J))
+        {
+            DebugData();
+        }
     }
 
     public static IEnumerator WaitForControllerPress()
@@ -85,4 +90,16 @@ public class ViveInput : MonoBehaviour
     {
         isPlaying = false;
     }
+
+    private void DebugData()
+    {
+        string path = Application.dataPath + "/Recordings/OneArm_Backward.sav";
+        JointsDataSequence data = SaveSystem.Load(path);
+        for (int i = 0; i < data.recordingTimes.Count; i++)
+        {
+            Debug.Log(data.recordingTimes[i]);
+        }
+        Debug.Log("start: " + data.recordingTimes[0]);
+        Debug.Log("end: " + data.recordingTimes[data.recordingTimes.Count - 1]);
+    }
 }