Table of Contents

Class RatatuiFocusManager

Namespace
RatatuiUnity

Scene-wide focus arbitration for multiple RatatuiRenderer instances. Only the focused renderer receives keyboard input. Mouse hover/click is unaffected: raycast and rect hit-testing already route mouse events to the correct renderer. Focus changes on mouse-down inside a renderer (click-to-focus).

public static class RatatuiFocusManager
Inheritance
RatatuiFocusManager
Inherited Members

Properties

Focused

The currently focused renderer, or null if none.

public static RatatuiRenderer Focused { get; }

Property Value

RatatuiRenderer

Methods

ClearFocus()

Clear focus. No renderer will receive keyboard input until SetFocus(RatatuiRenderer) is called.

public static void ClearFocus()

SetFocus(RatatuiRenderer)

Transfer focus to the given renderer. Pass null to clear focus. Reentrant-safe: if a callback re-enters SetFocus, this outer call suppresses its remaining notifications once the focus target has been superseded.

public static void SetFocus(RatatuiRenderer r)

Parameters

r RatatuiRenderer

Events

FocusChanged

Fires when focus changes. First arg: previous focused (may be null). Second: new focused (may be null).

public static event Action<RatatuiRenderer, RatatuiRenderer> FocusChanged

Event Type

Action<RatatuiRenderer, RatatuiRenderer>