Class ClimbInteractable
Interactable that can be climbed while selected.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
[SelectionBase]
[DisallowMultipleComponent]
[RequireComponent(typeof(Rigidbody))]
[AddComponentMenu("XR/Climb Interactable", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.4/api/UnityEngine.XR.Interaction.Toolkit.ClimbInteractable.html")]
public class ClimbInteractable : XRBaseInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect
Properties
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 |
climbSettingsOverride
Optional override of climb locomotion settings specified in the climb provider. Only applies as an override if Value is not null.
Declaration
public ClimbSettingsDatumProperty climbSettingsOverride { get; set; }
Property Value
Type | Description |
---|---|
ClimbSettingsDatumProperty |
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 |
filterInteractionByDistance
Controls whether to apply a distance check when validating hover and select interaction.
Declaration
public bool filterInteractionByDistance { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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 |
---|---|
Single |
See Also
Methods
Awake()
See MonoBehaviour.
Declaration
protected override void Awake()
Overrides
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 |
---|---|
Boolean | 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 |
---|---|
Boolean | 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()
Reset()
See MonoBehaviour.
Declaration
protected override void Reset()