InteractionEventChannel ScriptableObject asset and a static C# event. This helps centralize a data source for analytics, tutorials, global UI, and systems like the Feedback Manager.MicrogestureScroll.prefab. Install both if you plan to follow the Migrate an existing scene steps.InteractionEvent struct, and raises:InteractionEventChannel.OnEventRaised (shared ScriptableObject asset, raised only when a channel asset is assigned)InteractionBroadcaster.OnEventRaised (C# static event)InteractionEventChannel as well.FeedbackManager prefab includes an InteractionBroadcaster component.FeedbackManager.prefab into the root of your scene Hierarchy.Transform, FeedbackManager, and InteractionBroadcaster. It ships with the Event Channel field already assigned and with Auto Register Interaction Types enabled.InteractionBroadcaster.prefab into the root of your scene Hierarchy.InteractionBroadcaster.prefab ships with the default event channel asset already assigned to its Event Channel field, and with Auto Register Interaction Types enabled.InteractionEventChannel ScriptableObject asset to the Event Channel field, or leave it null to use only the static C# event. Interaction SDK ships a default asset in the Project panel at Packages > Meta XR Interaction SDK Essentials > Runtime > DefaultSettings. To make your own, select Assets > Create > Meta > Interaction SDK > Feedback > Interaction Event Channel.InteractionEventChannel is not a component. It is a ScriptableObject asset that ships with Interaction SDK and is referenced by the broadcaster’s Event Channel field.InteractionBroadcaster component. If no events reach your subscribers, see Troubleshooting.OnEventRaised in code.InteractionType, such as HoverStart or UISelectEnd. For the complete list of values, see InteractionType.GameObject, to watch a single object.InteractorView, or on _pointerId for pointer-based interactions.using Oculus.Interaction.Feedback;
using UnityEngine;
public class SelectionLogger : MonoBehaviour
{
private void OnEnable() => InteractionBroadcaster.OnEventRaised += HandleInteraction;
private void OnDisable() => InteractionBroadcaster.OnEventRaised -= HandleInteraction;
private void HandleInteraction(InteractionEvent evt)
{
bool isSelectStart = evt._type == InteractionType.SelectStart
|| evt._type == InteractionType.UISelectStart;
if (!isSelectStart || evt._source == null)
{
return;
}
// InteractorView is null for UI-origin events.
Debug.Log($"Selected {evt._source.name}, from UI: {evt.InteractorView == null}");
}
}
_type, _source, and _pointerId are public fields on the InteractionEvent struct despite the underscore prefix.RippleCursorEffect.prefab to your scene. The prefab pools and spawns instances of its child Cursor object. It requires a PokeInteractor in your rig and an Interaction Broadcaster in the scene.OnDisable to prevent memory leaks and handle domain reloads, as shown in the SelectionLogger example._source or InteractorView before accessing.static InteractionBroadcaster Instance { get; } – Singleton instance of the InteractionBroadcasterstatic event Action<InteractionEvent> OnEventRaised – Static C# event fired when any registered interaction occursstatic void RegisterCustomInteractionType<TInteractor, TInteractable>() – Registers a custom interactor-interactable pair for automatic event broadcastingstatic void UnregisterCustomInteractionType<TInteractor, TInteractable>() – Stops monitoring a custom interactor-interactable pairvoid RegisterInteractionType<TInteractor, TInteractable>() – Instance method to register a custom interaction typevoid UnregisterInteractionType<TInteractor, TInteractable>() – Instance method to stop monitoring an interaction typeevent Action<InteractionEvent> OnEventRaised – C# event raised by Raise. Subscribe in code. The channel asset itself is assignable in the Inspector, which is how systems share one channel without referencing each other.void Raise(in InteractionEvent interactionEvent) – Manually raises an interaction eventInteractionType _type – The type of interaction. See InteractionType for the complete list of values.IInteractorView InteractorView – The interactor that triggered the event. This is null for UI-origin events.GameObject _source – The source GameObject that was interacted with. This can be null.int _pointerId – Identifier for pointer-based interactions. Defaults to -1 when not applicable.InteractorView is null. None is a default sentinel and does not originate from an interactor.| Name | Numeric value |
|---|---|
None | 0 |
HoverStart | 1 |
HoverEnd | 2 |
SelectStart | 3 |
SelectEnd | 4 |
UIHoverStart | 10 |
UIHoverEnd | 11 |
UISelectStart | 12 |
UISelectEnd | 13 |
DiscreteScrollInputProvider, which ships in the Meta XR Interaction SDK Essentials package in the Oculus.Interaction namespace. The caller supplies the scroll direction, so the component works with any input source.DiscreteScrollInputProvider is marked [Experimental]. Experimental types can change or be removed without a deprecation cycle.DiscreteScrollInputProvider exposes the following members:| Member | Description |
|---|---|
Scroll(Vector2 direction) | Scrolls the current target in the given direction. A zero vector cancels in-flight momentum. |
ScrollUp(), ScrollDown(), ScrollLeft(), ScrollRight() | Convenience wrappers around Scroll. |
| Inspector field | Default |
|---|---|
Interactor | None. Assign the interactor that drives scrolling. |
Scroll Speed | 2 |
Stop Momentum On Target Change | Off |
MicrogestureScrollProvider component, along with the MicrogestureScrollProvider prefab instance if you used it.MicrogestureScrollSettings components. These components are obsolete. Any per-ScrollRect overrides they set are ignored.MicrogestureScroll.prefab into your Hierarchy. The prefab is a single GameObject carrying DiscreteScrollInputProvider, OVRMicrogestureEventSource, and MicroGestureUnityEventWrapper, with the four swipe events already bound to ScrollUp, ScrollDown, ScrollLeft, and ScrollRight.DiscreteScrollInputProvider, and your scene’s OVRHand to the Hand field on OVRMicrogestureEventSource. Both ship unset. DiscreteScrollInputProvider asserts at Start() if Interactor is empty.InteractionBroadcaster component is active in your scene.InteractionBroadcaster component in the Inspector.RegisterCustomInteractionType<TInteractor, TInteractable>() after the broadcaster starts. InteractionBroadcaster.OnEventRaised += (evt) => Debug.Log($"Event: {evt._type}");
RegisterCustomInteractionType<TInteractor, TInteractable>() in your script’s Start() method, after the broadcaster has initialized.Interactor<TInteractor, TInteractable> and your custom interactable derives from Interactable<TInteractor, TInteractable>. RegisterCustomInteractionType constrains both type parameters to these base classes, so a type that only implements IInteractor or IInteractable will not compile.InteractionBroadcaster component, confirm Auto Register Interaction Types is enabled. The UI pointer hooks are registered alongside the standard interaction types, so no UI events broadcast while this option is off.PointableCanvasModule component. PointableCanvasModule is a Unity PointerInputModule subclass, so exactly one instance must exist in the scene and it belongs on the EventSystem GameObject rather than on a Canvas. If it is missing, click Add Component and search for PointableCanvasModule.PointableCanvasModule is also present on a Canvas, remove it. Only one instance can exist in the scene, and it belongs on the EventSystem GameObject.PointableCanvasModule is first in the component list or has Exclusive Mode enabled. Otherwise, you can run into input conflicts.PointableCanvas component and a GraphicRaycaster component. PointableCanvas requires that its Canvas has a GraphicRaycaster.PointableCanvasUnityEventWrapper component and that it references the Canvas PointableCanvas.