From 5fa4b9fe406dac027c6ea9bd176ac90ce3af4307 Mon Sep 17 00:00:00 2001 From: dungdq Date: Tue, 13 May 2025 14:36:09 +0700 Subject: [PATCH] update content --- .../05-main-scene/10-desktop-bottom-bar-ui.md | 12 ++++------ .../05-main-scene/11-ui-mobile-panel.md | 10 +++----- .../05-main-scene/13-game-logo.md | 2 +- docs/faqs/03-setup-cocos-scene.md | 24 +++++++++++++++++++ 4 files changed, 32 insertions(+), 16 deletions(-) diff --git a/docs/02-setup-main-game/05-main-scene/10-desktop-bottom-bar-ui.md b/docs/02-setup-main-game/05-main-scene/10-desktop-bottom-bar-ui.md index 8f091aa..ae7054e 100644 --- a/docs/02-setup-main-game/05-main-scene/10-desktop-bottom-bar-ui.md +++ b/docs/02-setup-main-game/05-main-scene/10-desktop-bottom-bar-ui.md @@ -74,22 +74,18 @@ The `FormatText` property controls text formatting behavior for label components ### Step 3: Set Up UI In Main Scenes Create new node and configuration in your main scene: -![main scenes](../img/05-main-scene/prepare-ui-bottom-bar.png) +![main scenes](../img/05-main-scene/set-positon-bottom-bar.png) #### Platform Node Spawner Settings -| Setting | Value | Description | -|---------|-------|-------------| -| Desktop Toggle | βœ“ Enabled | Show prefabs for desktop platform | -| Mobile Toggle | ☐ Disabled | Hide prefabs for mobile platform | -| Target Prefab | `ui-bottom-bar-panel` | References prefab | +πŸ”— See setup details: [Platform Node Spawner](http://localhost:3000/docs/faqs/setup-cocos-scene#platform-node-spawner) ### Step 4: Apply Textures #### Texture Button Bar Checklist assets completed for bottom UI and button UI text :::info -πŸ”— Click here to follow the setup pack assets: [Here](http://localhost:3000/docs/category/game-asset-structure) +πŸ”— See setup details: [Game Asset Structure](http://localhost:3000/docs/category/game-asset-structure) ::: ![main scenes](../img/05-main-scene/prepare-ui-bottom-bar.png) @@ -97,7 +93,7 @@ Checklist assets completed for bottom UI and button UI text To configure the bottom bar UI helper. :::info -πŸ”— [Click here to follow run helper](http://localhost:3000/docs/submodule/hyper-editor-package#ui-bottom-bar-desktop-editor) +πŸ”—See setup details: [UI Bottom Bar Desktop Helper](http://localhost:3000/docs/submodule/hyper-editor-package#mobile-ui-helper) ::: --- \ No newline at end of file diff --git a/docs/02-setup-main-game/05-main-scene/11-ui-mobile-panel.md b/docs/02-setup-main-game/05-main-scene/11-ui-mobile-panel.md index 112b63b..9d6fd2c 100644 --- a/docs/02-setup-main-game/05-main-scene/11-ui-mobile-panel.md +++ b/docs/02-setup-main-game/05-main-scene/11-ui-mobile-panel.md @@ -49,11 +49,7 @@ Create new node and configuration in your main scene: #### 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 | +πŸ”— See setup details: [Platform Node Spawner](http://localhost:3000/docs/faqs/setup-cocos-scene#platform-node-spawner) ### Step 4: Apply Textures @@ -62,7 +58,7 @@ Create new node and configuration in your main scene: Checklist assets completed for Mobile UI :::info -πŸ”— [Click here to follow the setup pack assets](http://localhost:3000/docs/category/game-asset-structure) +πŸ”—See setup details [Game Asset Structure](http://localhost:3000/docs/category/game-asset-structure) ::: ![main scenes](../img/05-main-scene/add-texture-mobile-ui.png) @@ -70,7 +66,7 @@ Checklist assets completed for Mobile UI To configure the mobile UI helper. :::info -πŸ”— [Click here to follow run helper](http://localhost:3000/docs/submodule/hyper-editor-package#mobile-ui-helper) +πŸ”—See setup details: [Mobile Ui Helper](http://localhost:3000/docs/submodule/hyper-editor-package#mobile-ui-helper) ::: diff --git a/docs/02-setup-main-game/05-main-scene/13-game-logo.md b/docs/02-setup-main-game/05-main-scene/13-game-logo.md index a38797e..e9c6209 100644 --- a/docs/02-setup-main-game/05-main-scene/13-game-logo.md +++ b/docs/02-setup-main-game/05-main-scene/13-game-logo.md @@ -65,7 +65,7 @@ onLoad: function () { ![Desktop Settings](../img/05-main-scene/logo-setting-desktop.png) -πŸ”— Click [Here](#platform-node-spawner-settings) to follow `platform-ui-controller` + πŸ”— See setup details: [Platform UI Controller](http://localhost:3000/docs/faqs/setup-cocos-scene#platform-ui-controller) 2. Node Setup ```typescript diff --git a/docs/faqs/03-setup-cocos-scene.md b/docs/faqs/03-setup-cocos-scene.md index e69de29..2a55f42 100644 --- a/docs/faqs/03-setup-cocos-scene.md +++ b/docs/faqs/03-setup-cocos-scene.md @@ -0,0 +1,24 @@ +# Cocos Scene Setup +--- + +## Platform Node Spawner + +Use this configuration to control which prefabs appear based on the current platform. + +| Setting | Value | Description | +|--------------------|----------------------|-----------------------------------------------| +| **Desktop Toggle** | βœ… Enabled | Show prefab on desktop | +| **Mobile Toggle** | ❌ Disabled | Hide prefab on mobile | +| **Target Prefab** | `prefab name` | Name of the prefab to be spawned | + + +## Platform ui controller + +1. Attach this script to any node that should only appear on a specific platform. + +2. At runtime, the node will automatically be removed if it doesn’t match the active platform. + +| Setting | Value | Description | +|--------------------|----------------------|-----------------------------------------------| +| **Desktop Toggle** | βœ… Enabled | Show node on desktop | +| **Mobile Toggle** | ❌ Disabled | Hide node on mobile |