UnityEvent field named in camel case, such as _whenSelect. The Inspector shows the label in title case, so _whenSelect reads as When Select. Use the labels when you wire in the editor. Use the property names when you subscribe from code.| Wrapper | Set its target to | Use it for |
|---|---|---|
PointableUnityEventWrapper | An IPointable, such as a Grabbable or a PokeInteractable | Grab, throw, and poke feedback. Each event carries a PointerEvent. |
InteractableUnityEventWrapper | An IInteractableView, such as a PokeInteractable | Press feedback that follows the state of one interactable. |
InteractorUnityEventWrapper | An IInteractorView, such as a HandGrabInteractor | Reacting to a hand or controller instead of to an object. |
ActiveStateUnityEventWrapper | An IActiveState | Turning objects on and off when a state flips. |
PointableCanvasUnityEventWrapper | A PointableCanvas | Selection and highlight events across a Unity UI canvas. |
PointableUnityEventWrapper with the Audio Trigger component described in Audio Trigger.Grabbable, not at a grab interactable. A prop can carry both a GrabInteractable and a HandGrabInteractable, and both feed the same Grabbable. One wrapper on the Grabbable covers hand grab and controller grab together.Grabbable component.Audio.Audio for the grab sound. Add an Audio Source component to it, then add an Audio Trigger component.Audio GameObject and add a PointableUnityEventWrapper component.Grabbable into the Pointable field.MyProp GameObject
├── Grabbable component, the Pointable target
├── HandGrabInteractable child GameObject
├── GrabInteractable child GameObject
└── Audio child GameObject
├── PointableUnityEventWrapper component
│ When Select -> GrabSound.AudioTrigger.PlayAudio ()
│ When Unselect -> ReleaseSound.AudioTrigger.PlayAudio ()
├── GrabSound child GameObject: AudioSource + AudioTrigger
└── ReleaseSound child GameObject: AudioSource + AudioTrigger
Audio child like this. The other four put the wrapper on the prop root. Pointable is an object reference, so the wrapper works from either place.PointerEvent argument, which is what lets a method with no parameters receive the call.Stop on the Audio Source component instead.Box.prefab under the Interaction SDK samples, or the HandGrabExamples scene.DistanceHandGrabInteractable and wire When Hover to a hover clip, then wire When Select to a pull clip. The DistanceGrabExamples scene ships this pattern on three props.Grabbable when one sound covers every grab type.PointableUnityEventWrapper wraps any IPointable. Set Pointable to the target. Every event here carries a PointerEvent payload.| Inspector label | Property | Fires when |
|---|---|---|
When Release | WhenRelease | A pointer releases the selection while it still hovers the object. |
When Hover | WhenHover | A pointer begins to hover. |
When Unhover | WhenUnhover | A pointer stops hovering. |
When Select | WhenSelect | A pointer selects the object. |
When Unselect | WhenUnselect | A pointer releases the selection, even when it no longer hovers the object. |
When Move | WhenMove | A pointer moves. |
When Cancel | WhenCancel | The interaction is canceled. |
InteractableUnityEventWrapper wraps any IInteractableView. Set Interactable View to the target. These events carry no payload.| Inspector label | Property | Fires when |
|---|---|---|
When Hover | WhenHover | The interactable moves from normal to hover. |
When Unhover | WhenUnhover | The interactable moves from hover to normal. |
When Select | WhenSelect | The interactable moves from hover to select. |
When Unselect | WhenUnselect | The interactable moves from select to hover. |
When Interactor View Added | WhenInteractorViewAdded | Any interactor begins to hover, including a second one. |
When Interactor View Removed | WhenInteractorViewRemoved | An interactor stops hovering. |
When Selecting Interactor View Added | WhenSelectingInteractorViewAdded | Any interactor begins to select. |
When Selecting Interactor View Removed | WhenSelectingInteractorViewRemoved | An interactor stops selecting. |
PointableUnityEventWrapper instead.InteractorUnityEventWrapper wraps any IInteractorView. Set Interactor View to the target. These events carry no payload.| Inspector label | Property | Fires when |
|---|---|---|
When Enabled | WhenEnabled | The interactor moves from disabled to normal. |
When Disabled | WhenDisabled | The interactor enters the disabled state from any state. |
When Hover | WhenHover | The interactor moves from normal to hover. |
When Unhover | WhenUnhover | The interactor moves from hover to normal. |
When Select | WhenSelect | The interactor moves from hover to select. |
When Unselect | WhenUnselect | The interactor moves from select to hover. |
When Preprocessed | WhenPreprocessed | The interactor completes its preprocessing pass, once per frame. |
When Processed | WhenProcessed | The interactor completes a main processing pass. This runs more than once per frame on some interactors. |
When Postprocessed | WhenPostprocessed | The interactor completes its postprocessing pass, once per frame. |
ActiveStateUnityEventWrapper wraps any IActiveState. Set Active State to the target. This wrapper reads the state each frame in Update() and fires on every change.| Inspector label | Property | Fires when |
|---|---|---|
When Activated | WhenActivated | The state turns active. |
When Deactivated | WhenDeactivated | The state turns inactive. |
PointableCanvasUnityEventWrapper reports Unity UI activity for a whole canvas. Set Pointable Canvas to the target. One wrapper replaces per-Selectable wiring across that canvas.| Inspector label | Payload | Fires when |
|---|---|---|
When Selected Empty | none | A select lands on the canvas with no Selectable hovered. |
When Unselected Empty | none | An unselect lands with no Selectable hovered. |
When Begin Highlight With Object | GameObject | A Selectable begins to be hovered. |
When End Highlight With Object | GameObject | A Selectable stops being hovered. |
When Selected Hovered With Object | GameObject | A hovered Selectable is selected. |
When Unselected Hovered With Object | GameObject | A hovered Selectable is unselected. |
AddListener on the property. Assigning to the property does not compile.// _wrapper is a serialized PointableUnityEventWrapper field.
private void OnEnable()
{
_wrapper.WhenSelect.AddListener(HandleSelect);
}
private void OnDisable()
{
_wrapper.WhenSelect.RemoveListener(HandleSelect);
}
private void HandleSelect(PointerEvent evt)
{
Debug.Log("Grab started");
}
PointableCanvasUnityEventWrapper is the exception. Its events are private fields with no properties, so the Inspector is the only way to reach them.