소스 검색

Update ViveInput.cs

Kenkart 3 년 전
부모
커밋
14a867e229
1개의 변경된 파일13개의 추가작업 그리고 7개의 파일을 삭제
  1. 13 7
      Assets/Scripts/ViveInput.cs

+ 13 - 7
Assets/Scripts/ViveInput.cs

@@ -27,17 +27,23 @@ public class ViveInput : MonoBehaviour
     {
         if (grabPinch.GetStateDown(SteamVR_Input_Sources.Any))
         {
-            Debug.Log("Recording...");
-            isRecording = true;
+            
         }
 
         if (teleport.GetStateDown(SteamVR_Input_Sources.Any))
         {
-            Debug.Log("Saving...");
-            isRecording = false;
-            recordingTime = 0;
-            playerReplay.Save();
-            playerReplay.ResetRecording();
+            if (!isRecording)
+            {
+                Debug.Log("Recording...");
+                isRecording = true;
+            } else
+            {
+                Debug.Log("Saving...");
+                isRecording = false;
+                recordingTime = 0;
+                playerReplay.Save();
+                playerReplay.ResetRecording();
+            }
         }
 
         if (grabGrib.GetStateDown(SteamVR_Input_Sources.Any))