J'ai eu cette erreur Impossible de convertir implicitement le type System.Collections.Generic.List<Leap.Hand>
-Leap.Hand
Impossible de convertir implicitement le type `` System.Collections.Generic.List <Leap.Hand> à `Leap.Hand`
Voici mon code:
using UnityEngine;
using System.Collections;
using Leap;
using Leap.Unity;
public class Swimming : MonoBehaviour {
Controller controller;
void Start(){
controller = new Controller();
}
void Update(){
Frame frame = controller.Frame(); // controller is a Controller object
Hand hand = frame.Hands;
for (int i = 0; i < frame.Hands.Count; i++) {
if (frame.Hands [i].IsLeft) {
Debug.Log ("Left Hand Detected");
}
}
}
}
J'ai beaucoup cherché mais je n'ai pas pu trouver quelque chose. Quelqu'un peut-il me aider s'il vous plaît
'frame.Hands' est une collection d'instances' Hand'. Ce n'est pas un seul 'Hand'. C'est une chose qui contient beaucoup de 'Hand's. C'est une chose différente. Une boîte contenant des chatons n'est pas un chaton. Vous ne pouvez pas nourrir la boîte. Si vous voulez un chaton, vous devez attraper un chaton. C'est le chaton. La boîte n'est pas le chaton. –