API reference

WindowState Class

State holder for a single spatial window's lifecycle.
Exposes an observable WindowState.lifecycle for the Compose layer. The default MetaVR backend also uses this holder for its VolumetricWindowManager interactions. Failure details are carried on the WindowLifecycle.Failure variants; there is no separate error flow.
Obtain an instance via rememberWindowState and pass it to SpatialWindow. A state instance represents one window incarnation: remember or hoist it rather than constructing it inline, and replace it only when the hosted window should be recreated.

Signature

@Stable class WindowState

Constructors

WindowState ()
Signature
constructor()
Returns
WindowState

Properties

lifecycle : StateFlow
[Get]
Current lifecycle phase of the window.
Signature
val lifecycle: StateFlow<WindowLifecycle>