> ## Documentation Index
> Fetch the complete documentation index at: https://docs-vrsebuilder.autovrse.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Spatial UI

> Configure your In-VR user interfaces in Unity easily

## List of Centralized Interfaces

As a part of the design system we have templatized certain user interfaces that are part of the core ux, they are as follows:

* Main Menu & Login Flow

  <img src="https://mintcdn.com/autovrse-749835a2/0JNaYI6hdHzq3iRY/images/user-interfaces/03.png?fit=max&auto=format&n=0JNaYI6hdHzq3iRY&q=85&s=8db25a04ceda95cf4ad0fa378a7a2d69" alt="03 Pn" width="938" height="723" data-path="images/user-interfaces/03.png" />
* Module Selection Screens

  <img src="https://mintcdn.com/autovrse-749835a2/0JNaYI6hdHzq3iRY/images/user-interfaces/02.png?fit=max&auto=format&n=0JNaYI6hdHzq3iRY&q=85&s=cd550b9e9c7b61bcdf444389ddf4866f" alt="02 Pn" width="419" height="425" data-path="images/user-interfaces/02.png" />
* Settings and Configurations

  <img src="https://mintcdn.com/autovrse-749835a2/CB4aeLeCZxGuUlnb/images/user-interfaces/05.png?fit=max&auto=format&n=CB4aeLeCZxGuUlnb&q=85&s=09c3fae9b0e18db29708f035aad09e37" alt="05 Pn" width="432" height="301" data-path="images/user-interfaces/05.png" />

  <img src="https://mintcdn.com/autovrse-749835a2/CB4aeLeCZxGuUlnb/images/user-interfaces/04.png?fit=max&auto=format&n=CB4aeLeCZxGuUlnb&q=85&s=887fd0e0b60512e08c176bee7a8ca664" alt="04 Pn" width="800" height="518" data-path="images/user-interfaces/04.png" />
* Watch UI
* Checklists and MCQ Panel

## Color Palette

The entire UI can be custom configured to colors and branding of your liking centrally using this feature.

### GlobalUIColorConfig

You can find this file in Unity toolbar at **Tools>AutoVRse>GlobalUIColorConfig**. You will see a window like this appear

<img src="https://mintcdn.com/autovrse-749835a2/-2RtSKZHJ-9-YoQn/images/project-config/01.png?fit=max&auto=format&n=-2RtSKZHJ-9-YoQn&q=85&s=e3f363e35b9244ee8ecde4f7d49620f4" alt="" width="570" height="827" data-path="images/project-config/01.png" />

You will be able to modify the color component wise, once you update here the system will automatically apply your changes to all the UI in your projects

### UI Element Collector

As a part of the setup you must add this script to every scene that must be tracked to detect and apply centralized UI configuration as set in above GlobalUIColorConfig

<img src="https://mintcdn.com/autovrse-749835a2/-2RtSKZHJ-9-YoQn/images/project-config/02.png?fit=max&auto=format&n=-2RtSKZHJ-9-YoQn&q=85&s=ac0df28dfe84fe9ad929a9d9faec49a4" alt="" width="640" height="304" data-path="images/project-config/02.png" />

1. Create an Empty Gameobject on your scene
2. Add the Script "**UIElementCollector**"
3. Press the Collect UI Elements button

### UIColorPaletteManager

Add this script to your scene, this will help control color palette related operations on the scene.

1. Add an empty gameobject on your scene
2. Add the script "**UIColorPaletteManager**"

This will remove old references, ensuring the system works with the newly collected elements. After clearing, click **Initialize** to reapply the current settings to the new UI elements.

* Now you can use **Apply Light Mode** or **Apply Dark Mode** buttons to switch between themes. You can also **Reset to Default (Light Mode)** if needed.

## Main Menu

The main menu in a VR app made with VRse Builder serves as the starting point for users. Here, they can choose and launch the experience they wish to try. All available experiences are configured to be listed in this scene upon entering the app.
Below are the steps to add main menu to your application.

### Step 1:  Adding New Main Menu

1. Navigate to `Assets/Core/Scenes/Menu.unity`.
2. Open the menu scene.

<img src="https://mintcdn.com/autovrse-749835a2/wubtDzunhb8k1BSr/images/MenuScene.png?fit=max&auto=format&n=wubtDzunhb8k1BSr&q=85&s=e168c611be293cfa8f2927162632cf98" alt="" width="1083" height="907" data-path="images/MenuScene.png" />

1. Create a duplicate of the scene, rename it and move it your project folder.

### Step 2: Project Config , Room Config & Brand Config Setup

1. Right-click on the project and go to **Create > AutoVRse > VrseBuilder** to create the **ProjectConfig, RoomManager Config, and BrandConfig.**
2. Assign the Created **RoomConfig** & **BrandConfig** in the **Project Config File.**
3. In the **RoomConfig** , In the *Experiences* Section , Fill up the required details like ,*Module Name, Index, And assign the Dev, Art 0r Evaluation scene* based on the module. **Note : Ensure that the assigned scenes in the config are already included in the build settings.**
4. And Now in the **BrandConfig,** Assign the **Brand Logo Sprite & Decal texture (optional).**
5. In the **BrandConfig**, you have the flexibility to edit the default **Dark and Light mode Colors** to align with your project's requirements. These customized color properties will influence all user interfaces, including the *********MainMenu, ExperiencePanel, Checklist, and MCQ Panel.*********

   **For details on setting up the dark and light mode switching system, see the link below:** [**Dark and Light Mode Setup**](https://www.notion.so/Dark-and-Light-Mode-Color-Switching-System-Setup-1278b046f90b801a8166eca49e9e5525?pvs=21)

### Step 3: Configuring the Room Manager

1. Find the **RoomManager** script in the Inspector of the RoomManager GameObject.
2. And Assign your required **Room** & **Project Config** Files in the Script

   <img src="https://mintcdn.com/autovrse-749835a2/wubtDzunhb8k1BSr/images/NetworkedRoomManager.png?fit=max&auto=format&n=wubtDzunhb8k1BSr&q=85&s=35b0eafad0ee38a855be958841587ec8" alt="" width="672" height="332" data-path="images/NetworkedRoomManager.png" />
3. And make sure same project config being assigned in the **Edit/Project settings/VrseBuilder/ Project settings**

<img src="https://mintcdn.com/autovrse-749835a2/wubtDzunhb8k1BSr/images/VRBProjectSettings.png?fit=max&auto=format&n=wubtDzunhb8k1BSr&q=85&s=9a7b7923be6d433f6d86ef2a7f0660f3" alt="" width="1811" height="805" data-path="images/VRBProjectSettings.png" />

### Step 4: Configuring the Platform & Vrt Api

1. To find the **Vrt Api** script, navigate to the **Platform** Game Object.
2. In the **Vrt Api** Script, there are two URL fields:

<img src="https://mintcdn.com/autovrse-749835a2/wubtDzunhb8k1BSr/images/VRTAPI.png?fit=max&auto=format&n=wubtDzunhb8k1BSr&q=85&s=dcc0513aa4bdc0d4b408c6cf3a6877f4" alt="" width="672" height="112" data-path="images/VRTAPI.png" />

\
**Based on the Development Build Flag , The Login API will be changed automatically. Its Preferable for internal testing mark the build as Development Build ,For Release builds Uncheck the option.**

<img src="https://mintcdn.com/autovrse-749835a2/wubtDzunhb8k1BSr/images/BuildSettingsForLoginCofig.png?fit=max&auto=format&n=wubtDzunhb8k1BSr&q=85&s=bc4357f36863264f6bfd5a3fd6db4c63" alt="" width="595" height="431" data-path="images/BuildSettingsForLoginCofig.png" />

1. **Development URL: For internal testing using the dev dashboard.**
2. **UAT (User Acceptance Testing):** **For internal testing using the client dashboard.**
3. Production URL: Main URL (in progress, yet to be released).
4. Next, Change the login Method based on project login type in the **Platform new Script.**

### Step 5: Play the Scene

On Playing the Scene , The new menu includes a guest login option. Here's how it works:

* Selecting **Sign In** will display the appropriate login UI based on the chosen login type.
* Selecting **Continue as Guest** will automate the login process, immediately displaying the module.

<img src="https://mintcdn.com/autovrse-749835a2/wubtDzunhb8k1BSr/images/MainMenuUI.png?fit=max&auto=format&n=wubtDzunhb8k1BSr&q=85&s=41356d7abbff464f89fce9c89fca86e8" alt="" width="597" height="402" data-path="images/MainMenuUI.png" />

**Note:** Guest login is only available for **Directory** and **Username** login types. It is not supported in **Offline** or **OTP** login modes.

## Experience Panel

The experience panel is a spatial UI element placed near the user to display key details about the ongoing story. It provides information such as the current chapter, moment, and overall progress. For clear readability, the panel should always stay close to the user and move with them when they teleport. Additionally, it offers options for quitting the experience and returning to the main menu.
The experience panel is part of the default systems that come automatically when the scene is set up using the VRseBuilder Automation tool.

<img src="https://mintcdn.com/autovrse-749835a2/wubtDzunhb8k1BSr/images/ExperiencePanelInHierarchy.png?fit=max&auto=format&n=wubtDzunhb8k1BSr&q=85&s=33bf3997f3b4e84fe6ee8f7eeae19ef2" alt="" width="317" height="211" data-path="images/ExperiencePanelInHierarchy.png" />

<img src="https://mintcdn.com/autovrse-749835a2/wubtDzunhb8k1BSr/images/ExperiencePanel.png?fit=max&auto=format&n=wubtDzunhb8k1BSr&q=85&s=015a77eb7ed4d11f6400eb02fa4de4fc" alt="" width="508" height="192" data-path="images/ExperiencePanel.png" />
