Add a UI to a scene

After you create a , add it to the scene as a component on an entity.

  • In the Scene Editor, create an empty entity. To do this, right-click the scene and select Empty entity.

  • In the Property Grid (on the right by default), click Add component and select UI.

Add UI component

Game Studio adds a UI component to the entity.

  • The Select an asset window opens.

Select UI page

  • Select the UI page you want to add and click OK.

    For information about how to create and edit UI pages, see the UI editor page.

Tip

To stop the UI obscuring the rest of the scene in the editor, disable the UI component in the Property Grid.

Remember to enable the component again before you run the game. If you don't, Xenko doesn't display the UI.

You can assign a UI page to the property of a UI component.

To make UIs interactive, you need to add a script. Without scripts, UIs are simply non-interactive images.

For an example of a UI implemented in Xenko, see the game menu UI sample included with Xenko.