Back to API Reference
Class

UniTextNativeInput

static

Facade for native producer lifecycles and software-keyboard notifications.

public static bool IsKeyboardVisible{ get }

Gets whether a software keyboard is currently visible.

public static Rect KeyboardArea{ get }

Screen area occupied by the software keyboard. Returns zero when no keyboard is visible. In an embedded WebGL player, coordinates remain relative to the canvas and the rect can extend beyond the Unity screen bounds.

public static void SetInputFieldRect(Rect screenRect)

Updates the focused editor rectangle used by the active platform producer.

public static void SetCursorScreenPos(Vector2 screenPos, float lineHeight)

Updates the IME candidate anchor in Unity screen coordinates.

public static Vector2Int GetWindowClientSize()

Returns the native window's client-area size in OS pixels. Used to convert between Unity's virtual screen coordinates and actual window coordinates. Returns (Screen.width, Screen.height) on platforms without native window access.

public static void SetImeCaretScreenRect()

Requests a desktop-space caret rectangle from platforms that expose native IME placement.

public static void RegisterBackend(Func<INativeInputBackend> factory, int priority)

Registers a lazily created backend candidate ordered by descending priority.

public static Action<bool> KeyboardVisibilityChanged

Occurs when software-keyboard visibility changes.

public static Action<KeyboardEvent> KeyboardChanged

Occurs when the platform delivers a keyboard lifecycle event — show, hide, frame change, and (where supported) per-frame animation progress.