Interface IXRActivateInteractable
An interface that represents an Interactable component which Interactor components can activate. Not to be confused with the active state of a GameObject, an activate event in this context refers to a contextual command action, such as toggling a flashlight on and off.
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Interactables
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public interface IXRActivateInteractable : IXRInteractable
Properties
activated
The event that is called when the selecting Interactor activates this Interactable.
Declaration
ActivateEvent activated { get; }
Property Value
Type | Description |
---|---|
Activate |
Remarks
Not to be confused with activating or deactivating a Game
The Activate
See Also
deactivated
The event that is called when an Interactor deactivates this Interactable.
Declaration
DeactivateEvent deactivated { get; }
Property Value
Type | Description |
---|---|
Deactivate |
Remarks
Not to be confused with activating or deactivating a Game
The Deactivate
See Also
Methods
OnActivated(ActivateEventArgs)
This method is called when the Interactor begins an activation event on this Interactable.
Declaration
void OnActivated(ActivateEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Activate |
args | Event data containing the Interactor that is sending the activate event. |
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnDeactivated(DeactivateEventArgs)
This method is called when the Interactor ends an activation event on this Interactable.
Declaration
void OnDeactivated(DeactivateEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Deactivate |
args | Event data containing the Interactor that is sending the deactivate event. |
Remarks
args
is only valid during this method call, do not hold a reference to it.