Documentation Home
Breadcrumbs

Widget

Auto Spawnable — Widget

Auto spawnable UI widgets are used with the extension system to automatically add UI to the viewport based on context. Most commonly, they are used to add UI only in Desktop mode.

How to Declare an Auto Spawnable Widget

  1. Create an extension plugin.

  2. In the RegistrableAssets directory, create a new data asset that inherits from SkrAutoSpawnableUserWidgetDescription.

  3. In the Spawning Context field, select one of the available contexts (see below).

  4. In the Widget Class to Add to Viewport field, click + to create a UMG widget that inherits from UserWidget. Save it in a separate directory (not in RegistrableAssets).

Available Spawning Contexts

Context

Definition

ViewPort_Desktop

Widget spawned in viewport while in desktop mode

ViewPort

Widget added to viewport regardless of mode

ViewPort_VR

Widget spawned in viewport while in VR mode