docs.unity3d.com
    Show / Hide Table of Contents

    Class ARHumanBodyManager

    The manager for the human body subsystem.

    Inheritance
    Object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>
    ARHumanBodyManager
    Inherited Members
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.trackables
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.SetTrackablesActive(Boolean)
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.origin
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.sessionOrigin
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.gameObjectName
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.GetPrefab()
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.m_Trackables
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.m_PendingAdds
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.Awake()
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.OnEnable()
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.OnDisable()
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.CanBeAddedToSubsystem(ARHumanBody)
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.Update()
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.OnTrackablesChanged(List<ARHumanBody>, List<ARHumanBody>, List<ARHumanBody>)
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.OnCreateTrackable(ARHumanBody)
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.OnAfterSetSessionRelativeData(ARHumanBody, XRHumanBody)
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.CreateTrackableImmediate(XRHumanBody)
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.DestroyPendingTrackable(TrackableId)
    ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>.CreateTrackableFromExisting(ARHumanBody, XRHumanBody)
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>.subsystem
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>.descriptor
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>.GetActiveSubsystemInstance()
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>.EnsureSubsystemInstanceSet()
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>.OnEnable()
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>.OnDisable()
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>.OnDestroy()
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>.OnBeforeStart()
    SubsystemLifecycleManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider>.OnAfterStart()
    UnityEngine.MonoBehaviour.IsInvoking()
    UnityEngine.MonoBehaviour.CancelInvoke()
    UnityEngine.MonoBehaviour.Invoke(System.String, System.Single)
    UnityEngine.MonoBehaviour.InvokeRepeating(System.String, System.Single, System.Single)
    UnityEngine.MonoBehaviour.CancelInvoke(System.String)
    UnityEngine.MonoBehaviour.IsInvoking(System.String)
    UnityEngine.MonoBehaviour.StartCoroutine(System.String)
    UnityEngine.MonoBehaviour.StartCoroutine(System.String, System.Object)
    UnityEngine.MonoBehaviour.StartCoroutine(System.Collections.IEnumerator)
    UnityEngine.MonoBehaviour.StartCoroutine_Auto(System.Collections.IEnumerator)
    UnityEngine.MonoBehaviour.StopCoroutine(System.Collections.IEnumerator)
    UnityEngine.MonoBehaviour.StopCoroutine(UnityEngine.Coroutine)
    UnityEngine.MonoBehaviour.StopCoroutine(System.String)
    UnityEngine.MonoBehaviour.StopAllCoroutines()
    UnityEngine.MonoBehaviour.print(System.Object)
    UnityEngine.MonoBehaviour.useGUILayout
    UnityEngine.MonoBehaviour.runInEditMode
    UnityEngine.Behaviour.enabled
    UnityEngine.Behaviour.isActiveAndEnabled
    UnityEngine.Component.GetComponent(System.Type)
    UnityEngine.Component.GetComponent<T>()
    UnityEngine.Component.TryGetComponent(System.Type, UnityEngine.Component)
    UnityEngine.Component.TryGetComponent<T>(T)
    UnityEngine.Component.GetComponent(System.String)
    UnityEngine.Component.GetComponentInChildren(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentInChildren(System.Type)
    UnityEngine.Component.GetComponentInChildren<T>(System.Boolean)
    UnityEngine.Component.GetComponentInChildren<T>()
    UnityEngine.Component.GetComponentsInChildren(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentsInChildren(System.Type)
    UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean)
    UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean, System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponentsInChildren<T>()
    UnityEngine.Component.GetComponentsInChildren<T>(System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponentInParent(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentInParent(System.Type)
    UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
    UnityEngine.Component.GetComponentInParent<T>()
    UnityEngine.Component.GetComponentsInParent(System.Type, System.Boolean)
    UnityEngine.Component.GetComponentsInParent(System.Type)
    UnityEngine.Component.GetComponentsInParent<T>(System.Boolean)
    UnityEngine.Component.GetComponentsInParent<T>(System.Boolean, System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponentsInParent<T>()
    UnityEngine.Component.GetComponents(System.Type)
    UnityEngine.Component.GetComponents(System.Type, System.Collections.Generic.List<UnityEngine.Component>)
    UnityEngine.Component.GetComponents<T>(System.Collections.Generic.List<T>)
    UnityEngine.Component.GetComponents<T>()
    UnityEngine.Component.CompareTag(System.String)
    UnityEngine.Component.SendMessageUpwards(System.String, System.Object, UnityEngine.SendMessageOptions)
    UnityEngine.Component.SendMessageUpwards(System.String, System.Object)
    UnityEngine.Component.SendMessageUpwards(System.String)
    UnityEngine.Component.SendMessageUpwards(System.String, UnityEngine.SendMessageOptions)
    UnityEngine.Component.SendMessage(System.String, System.Object)
    UnityEngine.Component.SendMessage(System.String)
    UnityEngine.Component.SendMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
    UnityEngine.Component.SendMessage(System.String, UnityEngine.SendMessageOptions)
    UnityEngine.Component.BroadcastMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
    UnityEngine.Component.BroadcastMessage(System.String, System.Object)
    UnityEngine.Component.BroadcastMessage(System.String)
    UnityEngine.Component.BroadcastMessage(System.String, UnityEngine.SendMessageOptions)
    UnityEngine.Component.transform
    UnityEngine.Component.gameObject
    UnityEngine.Component.tag
    UnityEngine.Object.GetInstanceID()
    UnityEngine.Object.GetHashCode()
    UnityEngine.Object.Equals(System.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, System.Boolean)
    UnityEngine.Object.Instantiate<T>(T)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
    UnityEngine.Object.Destroy(UnityEngine.Object, System.Single)
    UnityEngine.Object.Destroy(UnityEngine.Object)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object, System.Boolean)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
    UnityEngine.Object.FindObjectsOfType(System.Type)
    UnityEngine.Object.FindObjectsOfType(System.Type, System.Boolean)
    UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
    UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
    UnityEngine.Object.DestroyObject(UnityEngine.Object)
    UnityEngine.Object.FindSceneObjectsOfType(System.Type)
    UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
    UnityEngine.Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
    UnityEngine.Object.FindObjectOfType(System.Type)
    UnityEngine.Object.FindObjectOfType(System.Type, System.Boolean)
    UnityEngine.Object.ToString()
    UnityEngine.Object.name
    UnityEngine.Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.XR.ARFoundation
    Syntax
    [DisallowMultipleComponent]
    [DefaultExecutionOrder(-2147483647)]
    public sealed class ARHumanBodyManager : ARTrackableManager<XRHumanBodySubsystem, XRHumanBodySubsystemDescriptor, XRHumanBodySubsystem.Provider, XRHumanBody, ARHumanBody>

    Properties

    gameObjectName

    The name for any generated GameObjects.

    Declaration
    protected override string gameObjectName { get; }
    Property Value
    Type Description
    String

    The name for any generated GameObjects.

    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem.Provider, UnityEngine.XR.ARSubsystems.XRHumanBody, UnityEngine.XR.ARFoundation.ARHumanBody>.gameObjectName

    humanBodyPose2DEstimationEnabled

    Whether 2D body pose tracking is enabled. This method is obsolete. Use pose2DRequested or pose2DEnabled instead.

    Declaration
    [Obsolete("Use pose2DEnabled or pose2DRequested instead. 2020-01-14")]
    public bool humanBodyPose2DEstimationEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    humanBodyPose3DEstimationEnabled

    Whether 3D body pose tracking is enabled. This method is obsolete. Use pose3DEnabled or pose3DRequested instead.

    Declaration
    [Obsolete("Use pose3DEnabled or pose3DRequested instead. 2020-01-14")]
    public bool humanBodyPose3DEstimationEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    humanBodyPose3DScaleEstimationEnabled

    Whether 3D body pose scale estimation is enabled. This method is obsolete. Use pose3DScaleEstimationEnabled or pose3DScaleEstimationRequested instead.

    Declaration
    [Obsolete("Use pose3DScaleEstimationRequested or pose3DScaleEstimationRequested instead. 2020-01-14")]
    public bool humanBodyPose3DScaleEstimationEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    humanBodyPrefab

    The Prefab object to instantiate at the location of the human body origin.

    Declaration
    public GameObject humanBodyPrefab { get; set; }
    Property Value
    Type Description
    UnityEngine.GameObject

    The Prefab object to instantiate at the location of the human body origin.

    pose2DEnabled

    Whether 2D human pose estimation is enabled. While pose2DRequested tells you whether 2D pose estimation has been requested, this property tells you whether 2D pose estimation is currently active in the subsystem.

    Declaration
    public bool pose2DEnabled { get; }
    Property Value
    Type Description
    Boolean

    pose2DRequested

    Whether 2D human pose estimation is requested.

    Declaration
    public bool pose2DRequested { get; set; }
    Property Value
    Type Description
    Boolean

    true if 2D human pose estimation is requested. Otherwise, false.

    pose3DEnabled

    Whether 3D human pose estimation is enabled.

    Declaration
    public bool pose3DEnabled { get; }
    Property Value
    Type Description
    Boolean

    pose3DRequested

    Whether 3D human pose estimation is requested.

    Declaration
    public bool pose3DRequested { get; set; }
    Property Value
    Type Description
    Boolean

    true if 3D human pose estimation is requested. Otherwise, false.

    pose3DScaleEstimationEnabled

    Whether 3D human body scale estimation is enabled.

    Declaration
    public bool pose3DScaleEstimationEnabled { get; }
    Property Value
    Type Description
    Boolean

    pose3DScaleEstimationRequested

    Whether 3D human body scale estimation is requested.

    Declaration
    public bool pose3DScaleEstimationRequested { get; set; }
    Property Value
    Type Description
    Boolean

    true if 3D human body scale estimation is requested. Otherwise, false.

    Methods

    GetHumanBody(TrackableId)

    Get the human body matching the trackable identifier.

    Declaration
    public ARHumanBody GetHumanBody(TrackableId trackableId)
    Parameters
    Type Name Description
    TrackableId trackableId

    The trackable identifier for querying a human body trackable.

    Returns
    Type Description
    ARHumanBody

    The human body trackable, if found. Otherwise, null.

    GetHumanBodyPose2DJoints(Allocator)

    Gets the human body pose 2D joints for the current frame.

    Declaration
    public NativeArray<XRHumanBodyPose2DJoint> GetHumanBodyPose2DJoints(Allocator allocator)
    Parameters
    Type Name Description
    Unity.Collections.Allocator allocator

    The allocator to use for the returned array memory.

    Returns
    Type Description
    Unity.Collections.NativeArray<XRHumanBodyPose2DJoint>

    The array of body pose 2D joints.

    Remarks

    The returned array might be empty if the system is not enabled for human body pose 2D or if the system does not detect a human in the camera image.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown if the implementation does not support human body pose 2D.

    GetPrefab()

    Gets the Prefab object to instantiate at the location of the trackable.

    Declaration
    protected override GameObject GetPrefab()
    Returns
    Type Description
    UnityEngine.GameObject

    A GameObject to instantiate at the location of the trackable, or null.

    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem.Provider, UnityEngine.XR.ARSubsystems.XRHumanBody, UnityEngine.XR.ARFoundation.ARHumanBody>.GetPrefab()

    OnAfterSetSessionRelativeData(ARHumanBody, XRHumanBody)

    Callback after the session relative data has been set to update the skeleton for the human body.

    Declaration
    protected override void OnAfterSetSessionRelativeData(ARHumanBody arBody, XRHumanBody xrBody)
    Parameters
    Type Name Description
    ARHumanBody arBody

    The human body trackable being updated.

    XRHumanBody xrBody

    The raw human body data from the subsystem.

    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem.Provider, UnityEngine.XR.ARSubsystems.XRHumanBody, UnityEngine.XR.ARFoundation.ARHumanBody>.OnAfterSetSessionRelativeData(UnityEngine.XR.ARFoundation.ARHumanBody, UnityEngine.XR.ARSubsystems.XRHumanBody)

    OnBeforeStart()

    Callback before the subsystem is started (but after it is created).

    Declaration
    protected override void OnBeforeStart()
    Overrides
    UnityEngine.XR.ARFoundation.SubsystemLifecycleManager<UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem.Provider>.OnBeforeStart()

    OnDestroy()

    Callback as the manager is being destroyed.

    Declaration
    protected override void OnDestroy()
    Overrides
    UnityEngine.XR.ARFoundation.SubsystemLifecycleManager<UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem.Provider>.OnDestroy()

    OnTrackablesChanged(List<ARHumanBody>, List<ARHumanBody>, List<ARHumanBody>)

    Callback when the trackable deltas are being reported.

    Declaration
    protected override void OnTrackablesChanged(List<ARHumanBody> added, List<ARHumanBody> updated, List<ARHumanBody> removed)
    Parameters
    Type Name Description
    List<ARHumanBody> added

    The list of human bodies added to the set of trackables.

    List<ARHumanBody> updated

    The list of human bodies updated in the set of trackables.

    List<ARHumanBody> removed

    The list of human bodies removed to the set of trackables.

    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRHumanBodySubsystem.Provider, UnityEngine.XR.ARSubsystems.XRHumanBody, UnityEngine.XR.ARFoundation.ARHumanBody>.OnTrackablesChanged(System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARHumanBody>, System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARHumanBody>, System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARHumanBody>)

    Events

    humanBodiesChanged

    The event that is fired when a change to the detected human bodies is reported.

    Declaration
    public event Action<ARHumanBodiesChangedEventArgs> humanBodiesChanged
    Event Type
    Type Description
    Action<ARHumanBodiesChangedEventArgs>
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, July 26, 2023