소스 검색

Update PlayerReplay.cs

Kenkart 2 년 전
부모
커밋
e2a9479838
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      Assets/Scripts/PlayerReplay.cs

+ 3 - 2
Assets/Scripts/PlayerReplay.cs

@@ -297,11 +297,12 @@ public class PlayerReplay : MonoBehaviour
                 bc.endStepsPressed = false;
             }
 
+            // TODO: maybe need to check if body is null or not (after 6 seconds body is destroyed, destroy a destroyed gameobject error?)
+            Destroy(body);
+
             // Wait for input
             yield return ViveInput.WaitForControllerPress();
 
-            Destroy(body);
-
             if (finish)
                 break;
         }