Auto Spawnable UI
Auto spawnable UI widgets are used with extension system to automatically add UI to the viewport from a given context. Most of the time, it will be used to add a UI only in Desktop mode (context "ViewPort_Desktop").
How to declare an AutoSpawnable actor
To decalre an AutoSpawnableActor:
- Create an extension plugin
- In the RegisterableAssets directory, create a new data asset that inherits from SkrAutoSpawnableUserWidgetDescription.
- In the Spawning context field of the description, add one of the context described bellow
- In the "Widget Class to Add to Viewport" field of the description, click on the "+" button to create an UMG widget that inherits from UserWidget. Save it in a different directory (RegisterableAssets should only be used to save DataAsset).
Available spawning context
Context name | Definition |
---|---|
ViewPort_Desktop | Spawn context for userWidgets you want spawned in viewport while in desktop |
ViewPort | Spawn context for userWidgets you want added to viewport |
ViewPort_VR | Spawn context for userWidgets you want spawned in viewport while in VR |