-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Description:
Standard Unity UI elements (Buttons, Toggles, etc.) nested as children of a RiveCanvasRenderer cannot receive pointer events.
CanvasPanelInputProvider implements ICanvasRaycastFilter, which Unity's GraphicRaycaster checks on the target and all its parents. When a child UI element is hit-tested, Unity walks up to the panel's filter, and IsRaycastLocationValid returns false (no Rive widget at that position), rejecting the child's raycast.
This is also broken with PointerInputMode.DisablePointerInput — the panel correctly disables raycastTarget on its Image, but IsRaycastLocationValid still unconditionally returns false, so children are blocked regardless.
There is no configuration that allows standard Unity UI elements to receive pointer events when nested inside a RivePanel.
Question:
Is mixing standard Unity UI elements as children of a RiveCanvasRenderer a supported use case? It's unclear in the documentation
Possible Fix:
One approach might be moving the hit-test logic from the panel down to individual Rive widget hitboxes, so the panel itself doesn't need to implement ICanvasRaycastFilter. I haven't fully evaluated the trade-offs of this approach, but it would eliminate the parent filter walk problem and allow Unity UI elements to coexist naturally alongside Rive widgets.