# Add a UI to a scene
BeginnerArtistDesigner
After you create a [UI page](ui-pages.md), add it to the scene as a component on an entity.
1. In the **Scene Editor**, create an empty entity. To do this, right-click the scene and select **Empty entity**.

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

Game Studio adds a **UI component** to the entity.

3. Next to **Page**, click  (**Select an asset**).
The **Select an asset** window opens.

4. 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](ui-editor.md) 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, Stride doesn't display the UI.
### Assign a UI page to a UI page component in code
You can assign a UI page to the `Page` property of a UI component.
```cs
// This property can be assigned from a UI page asset in Game Studio
public UIPage MyPage { get; set; }
protected override void LoadScene()
{
InitializeUI();
}
public void InitializeUI()
{
var rootElement = MyPage.RootElement;
// to look for a specific element in the UI page, extension methods can be used
var button = rootElement.FindVisualChildOfType