Class LocomotionMediator
Behavior that mediates user locomotion by providing LocomotionProvider components with access to the XRBodyTransformer linked to this behavior. This behavior manages the LocomotionState for each provider based on its requests for the Body Transformer.
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.Interaction.Toolkit.Locomotion
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/Locomotion/Locomotion Mediator", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.LocomotionMediator.html")]
[RequireComponent(typeof(XRBodyTransformer))]
public class LocomotionMediator : MonoBehaviour
Properties
xrOrigin
The XR Origin controlled by the XRBodyTransformer for locomotion.
Declaration
public XROrigin xrOrigin { get; set; }
Property Value
Type | Description |
---|---|
XROrigin |
Methods
Awake()
See MonoBehaviour.
Declaration
protected void Awake()
GetProviderLocomotionState(LocomotionProvider)
Queries the state of locomotion for the given provider.
Declaration
public LocomotionState GetProviderLocomotionState(LocomotionProvider provider)
Parameters
Type | Name | Description |
---|---|---|
LocomotionProvider | provider | The provider whose locomotion state to query. |
Returns
Type | Description |
---|---|
LocomotionState | Returns the state of locomotion for the given |
Update()
See MonoBehaviour.
Declaration
protected void Update()