API reference
API reference
Select your platform
No SDKs available
No versions available

PointableElement Class

Extends MonoBehaviour, IPointableElement
Canonical implementation of IPointableElement, this is a base type for components which represent something users can interact with by "pointing" at it.
As such, a PointableElement will receive, handles, and propagates (i.e., re-emits) PointerEvents generated by interactors pointing at the instance (typically PointerInteractor<TInteractor, TInteractable>s).
The Interaction SDK contains many examples of PointableElements, but one of the most versatile and important is the PointableCanvas, which allows a Unity Canvas (which can contain conventional 2D Unity UI) to be targed by Interaction SDK pointer interactions.

Properties

Optional IPointableElement to which this element will automatically forward its PointerEvents.
This is equivalent to programmatically adding that element's IPointableElement.ProcessPointerEvent(PointerEvent) method as a handler to this element's WhenPointerEventRaised event; this property simplyl allows that relationship to be set up in the UnityEditor.
If checked, if you’re selecting an object with one hand and then select it with the other hand, the original hand is forced to release the object.
If checked, when you select an object, that hand’s Vector3 points are added to the beginning of the list of Vector3 points instead of the end.
This property has very unique use cases, so in most cases you should use TransferOnSecondSelection instead.

Events

Implementation of IPointable.WhenPointerEventRaised; for details, please refer to the related documentation provided for that interface.

Fields

The set of all points (positions and orientations) to which anything is currently "pointing" without selecting; i.e., the set of locations at which hovering interactions currently exist.
Convenience method for counting the number of elements in Points; equivalent to calling Points.Count.
The set of all points (positions and orientations) to which anything is currently "pointing" while selecting; i.e., the set of locations at which select interactions currently exist.
Convenience method for counting the number of elements in SelectingPoints; equivalent to calling SelectingPoints.Count.

Protected Fields

List< Pose > _points[Get]
List< int > _pointIds[Get]
List< Pose > _selectingPoints[Get]
List< int > _selectingPointIds[Get]
bool _started[Get]

Protected Functions

virtual void Awake ( )
virtual void Start ( )
virtual void OnEnable ( )
virtual void OnDisable ( )
virtual void PointableElementUpdated
( PointerEvent evt )

Member Functions

Implementation of IPointableElement.ProcessPointerEvent(PointerEvent); for details, please refer to the related documentation provided for that interface.
Sets an IPointableElement to which a dynamically instantiated PointableElement should forward its PointerEvents.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Did you find this page helpful?