public void LoadChoosedGesture()
 {
     if (listGesture._allFileName[0] != "No items!")
     {
         handMoverLeft.StopPlay();
         handMoverRight.StopPlay();
         savedData = loadData.getTransformByIndex(dropdown.value, handMoverLeft.getChirality());
         handMoverLeft.SetNewTransforms(savedData._handPosition, savedData._handRotation);
         savedData = loadData.getTransformByIndex(dropdown.value, handMoverRight.getChirality());
         handMoverRight.SetNewTransforms(savedData._handPosition, savedData._handRotation);
         handMoverLeft.StartPlay();
         handMoverRight.StartPlay();
         PlayerPrefs.SetInt("ChoosedGesture", dropdown.value);
         PlayerPrefs.Save();
         SceneManager.LoadScene("ComplitingMovement");
     }
 }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     localTrans.AddRange(gameObject.GetComponentsInChildren <Transform>());
     handMover = gameObject.GetComponent <HandMover>();
     Debug.Log(PlayerPrefs.GetInt("ChoosedGesture"));
     savedData = new LoadData().getTransformByIndex(PlayerPrefs.GetInt("ChoosedGesture"), handMover.getChirality());
     poses     = savedData._handPosition;
     rots      = savedData._handRotation;
     Debug.Log(poses.Count + " poses.Count");
     checkZones = GetComponentsInChildren <CheckZone>();
     Debug.Log(checkZones.Length);
     handMover.SetNewTransforms(poses, rots);
 }