2025-05-12 19:05:24 +07:00

8.6 KiB

sidebar_position
sidebar_position
11

Mobile UI Panel

Overview

The mobile interface adapts to both landscape and portrait orientations:

Orientation Preview
Landscape Mobile Landscape
Portrait Mobile Portrait

Step 1: Set Up Prefabs

Step Action Description Image Reference
1 Locate mobile-ui Prefab Search for the mobile-ui prefab Locate Prefabs
2 Clone Assets Copy the required assets Asset Placement
3 Paste Assets Paste into: assets/game-assets/prefabs/mobile -
4 Locate buy-feature Prefab Search for the buy-feature prefab Locate Prefabs
5 Paste Prefab Paste into: assets/game-assets/prefabs/mobile -

:::tip File Structure Maintain this directory structure for proper prefab references:

assets/
└── game-assets/
    └── prefabs/
        └── mobile/
            ├── Exp: mobile-ui.prefab
            └── Exp: buy-feature.prefab

:::

Step 2: Rename Prefabs

Rename the copied prefabs by removing unnecessary prefixes:

Prefix to Remove Final Name
template- Prefab Naming Example

Step 3: Configure UI in Main Scenes

Create new node and configuration in your main scene:
main scenes

Platform Node Spawner Settings

Setting Value Description
Mobile Toggle ✓ Enabled Show prefabs for mobile platform
Desktop Toggle ☐ Disabled Hide prefabs for desktop platform
Target Prefab mobile-ui References prefab

Step 4: Apply Textures

Texture Mobile UI

Checklist assets completed for Mobile UI

:::info 🔗 Click here to follow the setup pack assets
::: main scenes

Run the Helper Tool

To configure the mobile UI helper. :::info 🔗 Click here to follow run helper :::

Step 5: Set Color Theme for Mobile Menu UI

Follow Design:

Auto Selection Result Auto Selection Result

Overview

The helper-paint-color-ui-mobile.js component is a customizable color painter for various UI elements in a MOBILE UI. It allows designers and developers to easily apply theme-based colors across the game interface.

Auto Selection Result

Ordinal number Properties Explaination Example
0 paintColor Trigger to repaint UI components Auto Selection Result
1 Main Ui Normal Color Default color of UI elements Auto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection ResultAuto Selection Result
2 Main Ui Highlight Color Highlight color for selected UI elements Auto Selection ResultAuto Selection Result
3 Toggle State Off Color Color of toggle when off Auto Selection Result
4 Toggle State On Color Color of toggle when on Auto Selection Result
5 Background Info Page Color Info screen background Auto Selection Result
6 Background Menu Color Menu background color Auto Selection Result
7 Background Point Panel Color Background panel for point/balance UI Auto Selection Result
8 Background Bottom Bar Color Background bottom bar (show only mobile portrait) Auto Selection Result
9 Button Quit Color Quit button color Auto Selection Result
10 Button Cancel Color Cancel button color Auto Selection Result
11 Label Balance Normal Color Normal balance label color Auto Selection Result
12 Label Balance Spin Color During-spin label color Auto Selection Result
13 Button Plus Minus Auto Color Button plus/Minus autoplay Auto Selection Result
14 Label Start Auto Color Start autoplay label Auto Selection Result
15 Label Outline Notification Outline color + width config Auto Selection Result
16 Total Win Medium Win Color Color for label medium win Auto Selection Result