docs.unity.cn

Input System 1.4.4

    Show / Hide Table of Contents

    Class TrackedPoseDriver

    The TrackedPoseDriver component applies the current pose value of a tracked device to the Transform of the GameObject. TrackedPoseDriver can track multiple types of devices including XR HMDs, controllers, and remotes.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    TrackedPoseDriver
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.InputSystem.XR
    Syntax
    [Serializable]
    [AddComponentMenu("XR/Tracked Pose Driver (Input System)")]
    public class TrackedPoseDriver : MonoBehaviour, ISerializationCallbackReceiver
    Remarks

    For positionInput and rotationInput, if an action is directly defined in the InputActionProperty, as opposed to a reference to an action externally defined in an InputActionAsset, the action will automatically be enabled and disabled by this behavior during OnEnable() and OnDisable(). The enabled state for actions externally defined must be managed externally from this behavior.

    Properties

    positionAction

    Declaration
    public InputAction positionAction { get; set; }
    Property Value
    Type Description
    InputAction

    positionInput

    The action to read the position value of a tracked device. Must support reading a value of type Vector3.

    Declaration
    public InputActionProperty positionInput { get; set; }
    Property Value
    Type Description
    InputActionProperty

    rotationAction

    Declaration
    public InputAction rotationAction { get; set; }
    Property Value
    Type Description
    InputAction

    rotationInput

    The action to read the rotation value of a tracked device. Must support reading a value of type Quaternion.

    Declaration
    public InputActionProperty rotationInput { get; set; }
    Property Value
    Type Description
    InputActionProperty

    trackingType

    The tracking type being used by the Tracked Pose Driver to control which Transform properties to update.

    Declaration
    public TrackedPoseDriver.TrackingType trackingType { get; set; }
    Property Value
    Type Description
    TrackedPoseDriver.TrackingType
    See Also
    TrackedPoseDriver.TrackingType

    updateType

    The update type being used by the Tracked Pose Driver to control which phases of the player loop will update Transform properties.

    Declaration
    public TrackedPoseDriver.UpdateType updateType { get; set; }
    Property Value
    Type Description
    TrackedPoseDriver.UpdateType
    See Also
    TrackedPoseDriver.UpdateType

    Methods

    Awake()

    This function is called when the script instance is being loaded.

    Declaration
    protected virtual void Awake()

    OnBeforeRender()

    Declaration
    protected virtual void OnBeforeRender()

    OnDestroy()

    This function is called when the MonoBehaviour will be destroyed.

    Declaration
    protected virtual void OnDestroy()

    OnDisable()

    This function is called when the object becomes disabled or inactive.

    Declaration
    protected void OnDisable()

    OnEnable()

    This function is called when the object becomes enabled and active.

    Declaration
    protected void OnEnable()

    OnUpdate()

    Declaration
    protected virtual void OnUpdate()

    PerformUpdate()

    Declaration
    protected virtual void PerformUpdate()

    Reset()

    This function is called when the user hits the Reset button in the Inspector's context menu or when adding the component the first time. This function is only called in editor mode.

    Declaration
    protected void Reset()

    SetLocalTransform(Vector3, Quaternion)

    Declaration
    protected virtual void SetLocalTransform(Vector3 newPosition, Quaternion newRotation)
    Parameters
    Type Name Description
    Vector3 newPosition
    Quaternion newRotation

    UpdateCallback()

    Declaration
    protected void UpdateCallback()

    Explicit Interface Implementations

    ISerializationCallbackReceiver.OnAfterDeserialize()

    Declaration
    void ISerializationCallbackReceiver.OnAfterDeserialize()
    Implements
    ISerializationCallbackReceiver.OnAfterDeserialize()

    ISerializationCallbackReceiver.OnBeforeSerialize()

    Declaration
    void ISerializationCallbackReceiver.OnBeforeSerialize()
    Implements
    ISerializationCallbackReceiver.OnBeforeSerialize()
    In This Article
    • Properties
      • positionAction
      • positionInput
      • rotationAction
      • rotationInput
      • trackingType
      • updateType
    • Methods
      • Awake()
      • OnBeforeRender()
      • OnDestroy()
      • OnDisable()
      • OnEnable()
      • OnUpdate()
      • PerformUpdate()
      • Reset()
      • SetLocalTransform(Vector3, Quaternion)
      • UpdateCallback()
    • Explicit Interface Implementations
      • ISerializationCallbackReceiver.OnAfterDeserialize()
      • ISerializationCallbackReceiver.OnBeforeSerialize()
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Thursday, November 3, 2022
    Terms of use