First of all, you should almost always get the Frame from a LeapProvider object, not directly from the Leap.Controller. The provider transforms the coordinates in the frame, hands, and fingers into the Unity frame of reference relative to the LeapHandController GameObject. If you get the frame directly from Leap.Controller, all the data is still in the Leap Motion coordinate system. The data will not match the hands displayed in Unity.
For the second part, List is a standard C# .NET class. You can add a:
using System.Collections.Generic;
statement to the script. Here's a typical way to access hands in a Unity script in Orion:
using UnityEngine;
using System.Collections.Generic;
using Leap;
public class LeapBehavior : MonoBehaviour {
LeapProvider provider;
void Start ()
{
provider = FindObjectOfType<LeapProvider>() as LeapProvider;
}
void Update ()
{
Frame frame = provider.CurrentFrame;
List<Hand> hands = frame.Hands;
for (int h = 0; h < hands.Count; h++)
{
Hand hand = hands[h];
if (hand.IsLeft)
{
transform.position = hand.PalmPosition.ToVector3() +
hand.PalmNormal.ToVector3() *
(transform.localScale.y * .5f + .02f);
transform.rotation = hand.Basis.Rotation();
}
}
}
}
Note that we may end up bringing back refactored HandList and FingerList classes as we optimize the code to reduce GC allocations.