The entity to associate with this UI renderer. When the entity is removed, the UI renderer is automatically cleaned up.
The UI component to render
Optional options: UiRendererOptionsOptional virtual size used for UI scale factor when main UI has none.
Defaults and the mobile 16:9 override behave as in setUiRenderer.
screenInset is honored per renderer, independently of the main UI's value,
and defaults to 'device' here too.
Set the main UI renderer. Optional virtual size defines the global UI scale factor.
When no virtual size is provided, a platform default is used: 1600x720 on mobile, 1920x1080 otherwise. Providing an invalid size disables the virtual screen (no UI scaling): either a value <= 0, or only one of the two dimensions, which additionally logs a warning. On mobile, a provided 16:9 virtual size is overridden to 1600x720 to fit phone screens.
The optional screenInset selects the screen area the UI is positioned in
(see UiScreenInset); it defaults to 'device'. Pass 'none' to
place the UI over the whole screen.
Optional options: UiRendererOptions
Add a UI renderer associated with an entity. The UI will be automatically cleaned up when the entity is removed from the engine.
If a renderer is already associated with the given entity, it will be replaced.
This allows dynamically adding UI Renderers that are rendered alongside the main UI set via setUiRenderer().