# Screen Overlay Buttons

This documentation explains how to set up and use the overlay buttons whithin a scene. All elements are in the UIPrefabs folder.

## Overview

* **OverlayButtons Prefab**: A pre-designed canvas that serves as the central UI element for your set up
* **Button Prefabs**: Predefined button styles designed for different functionalities and use cases, such as camera position, group connection and signal trigger.

## Setup

### Adding the user canvas

1. Drag and drop the OverlayButtons-Prefab in the hierarchy. There are no further parameter needed.
2. the button placement area, named "Buttons," is positioned by default along the right margin.

### Button prefabs

All button prefabs include the `rvUIToolbarButton` component, where you can configure the following parameters:

* **Item Tooltip**: Defines the button's tooltip text.
* **Tooltip Position**: Sets the tooltip's display position relative to the button.

<div align="left"><figure><img src="/files/2p0JUUvE964rdH9SK6ZY" alt=""><figcaption><p>rvUIToolbarButton</p></figcaption></figure></div>

Each button GameObject contains two child images where you can assign custom sprites

<div align="left"><figure><img src="/files/zsUgj9nAO5HhUIS2cAgk" alt=""><figcaption><p>Set button images</p></figcaption></figure></div>

#### Button Camera position

#### Within the component "StartCameraPosition" you can assign a Camera Pos.

<figure><img src="/files/jgcke8LvNVRQP1nYL1GB" alt=""><figcaption></figcaption></figure>

A camera position is created in the following way:

* "Right Click" in your project and select "Create/realvirtual/Add Camera Position". This creates a scriptable object where you define the position of the camera.
* Assign the created camera position to the "StartCameraPosition" component.

<figure><img src="/files/tunAe3GtiA8NIj6kyfTh" alt=""><figcaption></figcaption></figure>

#### Button Show Group

The `ButtonShowGroup` component provides a list of groups available to the user in Playmode. Select a group to control its visibility with the button.

<div align="left"><figure><img src="/files/rjobQRmNQuRp9bIc9GdY" alt=""><figcaption></figcaption></figure></div>

To define these groups for Playmode, use the [`GroupManager`](/basics/runtime-ui/group-manager.md) in the RealVirtual prefab. Ensure the `GroupManager` used is also assigned in the `ButtonShowGroup` component.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.realvirtual.io/components-and-scripts/scene-interaction/screen-overlay-buttons.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
