Class PointerCaptureOracle
Pointer-over-UI and keyboard-capture predicates against a live UI Toolkit panel or a Unity UI (Canvas) EventSystem, so map input can stand down when a widget or a text field owns the event instead.
public static class PointerCaptureOracle
- Inheritance
-
objectPointerCaptureOracle
Methods
IsEditableText(VisualElement)
public static bool IsEditableText(VisualElement e)
Parameters
eVisualElement
Returns
IsKeyboardCaptured(IPanel)
public static bool IsKeyboardCaptured(IPanel panel)
Parameters
panelIPanel
Returns
IsKeyboardCapturedByUnityUi(EventSystem)
public static bool IsKeyboardCapturedByUnityUi(EventSystem eventSystem)
Parameters
eventSystemEventSystemThe live EventSystem; null answers false.
Returns
IsPointerOverUi(IPanel, Vector2)
public static bool IsPointerOverUi(IPanel panel, Vector2 screenTopLeftPx)
Parameters
panelIPanelscreenTopLeftPxVector2
Returns
IsPointerOverUnityUi(EventSystem, Vector2)
True when a Unity UI (Canvas) raycaster reports a hit at the given screen position, so map input must stand down there.
public static bool IsPointerOverUnityUi(EventSystem eventSystem, Vector2 screenTopLeftPx)
Parameters
eventSystemEventSystemThe live EventSystem; null answers false.
screenTopLeftPxVector2Pointer position in screen px, top-left origin.
Returns
- bool
True on any hit from any registered raycaster except a PhysicsRaycaster (or Physics2DRaycaster, which derives from it) collider hit - that is world content, not UI; canvases on a display other than 0 are not checked.