Relevant only to lenses that use SpectaclesSyncKit when it has SyncInteractionManager in its prefab. If set to SyncInteractionType.All, any user connected to the session can interact with this Interactable. If set to SyncInteraction.Host, only the session host can interact with this Interactable. If set to SyncInteraction.Local, only the local user can interact with this Interactable. Make sure to programmatically define the local user by setting interactable.localConnectionId to the user's connection ID. If set to SyncInteraction.HostAndLocal, both the host and local user can interact with this Interactable.
Controls from which directions a poke interaction can trigger this Interactable along the X-axis:
Controls from which directions a poke interaction can trigger this Interactable along the Y-axis:
Controls from which directions a poke interaction can trigger this Interactable along the Z-axis:
Determines whether this Interactable can be simultaneously controlled by multiple Interactors. When false, only one Interactor type (e.g., left hand or right hand) can interact with this Interactable at a time, and subsequent interaction attempts from different Interactors will be blocked. Set to true to enable interactions from multiple sources simultaneously, such as allowing both hands to manipulate the Interactable at once.
Readonly
apiGeneric object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.
Provides all colliders associated with this Interactable.
If disabled, the Component will stop enacting its behavior.
Enable this to allow the Interactable to instantly be dragged on trigger rather than obeying the Interactor's drag threshold.
Enable Poke Directionality to help prevent accidental interactions when users approach from unwanted angles.
A flag that enables scroll interactions when this element is interacted with. When true, interactions with this element can scroll a parent ScrollView that has content extending beyond its visible bounds.
Relevant only to lenses that use SpectaclesSyncKit when it has SyncInteractionManager in its prefab. If set to true on the same frame as creating the Interactable component, events targeting this Interactable will be propagated to other connections in the same lens.
Called when an interactor was in a down event with this interactable and was dragging.
Called when an interactor is in a down event with this interactable and has moved a minimum drag distance.
Called when an interactor is in a down event with this interactable and is moving.
Called whenever the interactable enters the hovered state.
Called whenever the interactable is no longer hovered.
Called whenever an interactor remains hovering over this interactable.
Called whenever a new interactor hovers over this interactable.
Called whenever an interactor exits hovering this interactable.
Called whenever an interactor is no longer triggering the interactable.
Called whenever an interactor triggers an interactable.
Called whenever an interactor is lost and was in a down event with this interactable.
Called whenever the interactable exits the triggered state.
Called whenever the interactable enters the triggered state.
Called whenever an interactor continues to trigger an interactable.
Readonly
sceneThe scene object this component is on.
Defines how an interactor can interact with this interactable. Values are: 1: Direct: Only allows close pinch interactions where a hand directly touches the Interactable. 2: Indirect: Allows interactions from a distance with raycasting. 3: Direct/Indirect: Supports both direct and indirect interaction methods. 4: Poke: Enables finger poking interactions. 7: All: Supports all targeting modes (Direct, Indirect, and Poke).
Readonly
uniqueInteractors that are hovering this interactable
Interactors that are triggering this interactable
Adds a new SceneEvent, triggered by eventType
events, to the ScriptComponent.
Destroys the component.
Notifies the interactable that it is exiting a dragged state with the interactor
event parameters, with omitted interactable
Notifies the interactable that it is in a dragged state with the interactor
event parameters, with omitted interactable
Returns the SceneObject the component is attached to.
Returns the Transform this component is attached to.
Static
getReturns the name of this object's type.
Notifies the interactable that it is entering hover state
the interactor that is driving the event Interactor
Notifies the interactable that it is exiting hover state
event parameters, with omitted interactable
Notifies the interactable that it is still hovering
event parameters, with omitted interactable
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
Removes a previously added SceneEvent from the ScriptComponent.
Notifies the interactable that it is a cancelled state with the interactor
event parameters, with omitted interactable
Notifies the interactable that it is exiting trigger state
event parameters, with omitted interactable
Notifies the interactable that it is entering trigger state
event parameters, with omitted interactable
Notifies the interactable that it is still in a triggering state
event parameters, with omitted interactable
This class represents an interactable object that can respond to various interaction events such as hover, trigger, and drag. It provides event handlers for these interactions and uses the InteractionConfigurationProvider for configuration.