5.6 KiB
sidebar_position
sidebar_position |
---|
11 |
Mobile UI Panel
Overview
The Mobile UI provides a responsive interface for gameplay controls, adapting to both Landscape and Portrait orientations on mobile devices.
Orientation | Preview |
---|---|
Landscape | ![]() |
Portrait | ![]() |
Implementation
Step 1: Set Up Prefabs
Configure the necessary prefabs for the Mobile UI.
Tip: Maintain the following directory structure for proper prefab references:
assets/
└── game-assets/
└── prefabs/
└── mobile/
├── mobile-ui.prefab
└── buy-feature.prefab
Step 2: Rename Prefabs
Rename the copied prefabs by removing unnecessary prefixes to ensure consistency.
Prefix to Remove | Example |
---|---|
template- |
![]() |
Step 3: Configure UI in Main Scene
Add and configure a new node in the main scene to integrate the Mobile UI.
Platform Node Spawner Settings:
Step 4: Apply Textures
Ensure all Mobile UI assets are prepared and applied correctly.
Run the Helper Tool:
- Use the Mobile UI helper tool to configure the UI components.
Step 5: Set Color Theme for Mobile UI
Customize the color theme for the Mobile UI using the helper-paint-color-ui-mobile.js
component to apply theme-based colors across UI elements.
Follow Design:
Landscape | Portrait |
---|---|
![]() |
![]() |
Configuration Steps:
-
Access the Helper Component:
-
Configure Color Properties:
- Adjust the following properties to match the game design:
Tip: Ensure color values align with the game’s visual design specifications.