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
-
Create an extension plugin.
-
In the
RegistrableAssetsdirectory, create a new data asset that inherits from SkrAutoSpawnableUserWidgetDescription. -
In the Spawning Context field, select one of the available contexts (see below).
-
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 inRegistrableAssets).
Available Spawning Contexts
|
Context |
Definition |
|---|---|
|
|
Widget spawned in viewport while in desktop mode |
|
|
Widget added to viewport regardless of mode |
|
|
Widget spawned in viewport while in VR mode |