Class ClimbInteractable
Interactable that can be climbed while selected.
Implements
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion.Climbing
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[SelectionBase]
[DisallowMultipleComponent]
[RequireComponent(typeof(Rigidbody))]
[AddComponentMenu("XR/Climb Interactable", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.Climbing.ClimbInteractable.html")]
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public class ClimbInteractable : XRBaseInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect
Properties
climbAssistanceTeleportVolume
The teleport volume used to assist with movement to a specific destination after ending a climb (optional, may be null). If there is a ClimbTeleportInteractor in the scene that references the same ClimbProvider as this interactable, it will interact with the volume while this interactable is being climbed.
Declaration
public TeleportationMultiAnchorVolume climbAssistanceTeleportVolume { get; set; }
Property Value
Type | Description |
---|---|
TeleportationMultiAnchorVolume |
See Also
climbProvider
The climb provider that performs locomotion while this interactable is selected. If no climb provider is configured, will attempt to find one.
Declaration
public ClimbProvider climbProvider { get; set; }
Property Value
Type | Description |
---|---|
ClimbProvider |
See Also
climbSettingsOverride
Optional override of climb locomotion settings specified in the climb provider. Only applies as an override if Unity.XR.CoreUtils.Datums.DatumProperty<TValue, TDatum>.Value is not null.
Declaration
public ClimbSettingsDatumProperty climbSettingsOverride { get; set; }
Property Value
Type | Description |
---|---|
ClimbSettingsDatumProperty |
See Also
climbTransform
Transform that defines the coordinate space for climb locomotion. Will use this GameObject's Transform by default.
Declaration
public Transform climbTransform { get; set; }
Property Value
Type | Description |
---|---|
Transform |
See Also
filterInteractionByDistance
Controls whether to apply a distance check when validating hover and select interaction.
Declaration
public bool filterInteractionByDistance { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
maxInteractionDistance
The maximum distance that an interactor can be from this interactable to begin hover or select. Only applies when filterInteractionByDistance is true.
Declaration
public float maxInteractionDistance { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
Methods
Awake()
See MonoBehaviour.
Declaration
protected override void Awake()
Overrides
See Also
IsHoverableBy(IXRHoverInteractor)
Determines if a given Interactor can hover over this Interactable.
Declaration
public override bool IsHoverableBy(IXRHoverInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRHoverInteractor | interactor | Interactor to check for a valid hover state with. |
Returns
Type | Description |
---|---|
bool | Returns true if hovering is valid this frame. Returns false if not. |
Overrides
See Also
IsSelectableBy(IXRSelectInteractor)
Determines if a given Interactor can select this Interactable.
Declaration
public override bool IsSelectableBy(IXRSelectInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRSelectInteractor | interactor | Interactor to check for a valid selection with. |
Returns
Type | Description |
---|---|
bool | Returns true if selection is valid this frame. Returns false if not. |
Overrides
See Also
OnSelectEntered(SelectEnterEventArgs)
The XRInteractionManager calls this method when the Interactor first initiates selection of an Interactable in a second pass.
Declaration
protected override void OnSelectEntered(SelectEnterEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectEnterEventArgs | args | Event data containing the Interactor that is initiating the selection. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnSelectExited(SelectExitEventArgs)
The XRInteractionManager calls this method when the Interactor ends selection of an Interactable in a second pass.
Declaration
protected override void OnSelectExited(SelectExitEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectExitEventArgs | args | Event data containing the Interactor that is ending the selection. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnValidate()
See MonoBehaviour.
Declaration
protected virtual void OnValidate()
See Also
Reset()
See MonoBehaviour.
Declaration
protected override void Reset()