Class XRHandShape
Description of a hand shape, which is a set of constraints on some or all of the fingers' shapes.
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Hands.Gestures
Assembly: Unity.XR.Hands.dll
Syntax
[CreateAssetMenu(fileName = "New Hand Shape", menuName = "XR/Hand Interactions/Hand Shape")]
public class XRHandShape : ScriptableObject
Properties
fingerShapeConditions
The list of finger state conditions for this hand shape.
Declaration
public List<XRFingerShapeCondition> fingerShapeConditions { get; set; }
Property Value
Type | Description |
---|---|
List<XRFingerShapeCondition> |
Methods
CheckConditions(XRHandJointsUpdatedEventArgs)
Check the hand shape against the given updated hand joint data.
Declaration
public bool CheckConditions(XRHandJointsUpdatedEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
XRHandJointsUpdatedEventArgs | eventArgs | The hand joints updated event arguments to reference for the latest hand. |
Returns
Type | Description |
---|---|
bool | Returns true if all the finger state conditions are met. Otherwise, returns false. |
Remarks
The check will end early if the hand is not tracked or after the first finger state condition is found to be false. The order of the conditions will determine the order they are checked.