update final game assets structure
@ -196,6 +196,8 @@ Main game assets are stored in the `main-game` folder, organized by platform and
|
|||||||
When a feature is activated, its assets are loaded directly, bypassing the main game asset folders.
|
When a feature is activated, its assets are loaded directly, bypassing the main game asset folders.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
#### Feature Game Asset
|
#### Feature Game Asset
|
||||||
|
|
||||||
##### Overview
|
##### Overview
|
||||||
@ -229,28 +231,132 @@ Feature game assets (e.g., free-game, pickup, bonus, gamble) are stored in a fol
|
|||||||
|:-----------:|:-----------------:|:---------------:|
|
|:-----------:|:-----------------:|:---------------:|
|
||||||
|  |  |  |
|
|  |  |  |
|
||||||
|
|
||||||
#### Localizes Asset
|
---
|
||||||
|
|
||||||
`localizes/` là nơi lưu trữ assets của các ngôn ngữ khác nhau như : ZH, TH, ID..v.v
|
#### Localized Assets
|
||||||
|
|
||||||
|
The `localizes/` folder contains assets tailored for different languages (e.g., ZH, TH, ID). This ensures that fonts and textures can be displayed appropriately for each supported locale.
|
||||||
|
|
||||||
|
##### Folder structure:
|
||||||
|
|
||||||
```plaintext
|
```plaintext
|
||||||
assets/
|
assets/
|
||||||
└── game-assets/
|
└── game-assets/
|
||||||
├── fonts/
|
├── fonts/
|
||||||
│ ├── localizes/ # Localized font files
|
│ ├── localizes/ # Fonts for each language
|
||||||
│ └── preloads/ # Fonts loaded at startup
|
│ └── preloads/ # Default fonts (usually English) loaded at startup
|
||||||
└── textures/
|
└── textures/
|
||||||
├── desktop/
|
├── desktop/
|
||||||
│ ├── localizes/ # Localized textures for desktop
|
│ ├── localizes/ # Desktop textures for each language
|
||||||
│ ├── postloads/ # Desktop textures loaded after startup
|
│ ├── postloads/ # Desktop textures loaded after startup (default: en)
|
||||||
│ └── preloads/ # Desktop textures loaded at startup
|
│ └── preloads/ # Desktop textures loaded at startup (default: en)
|
||||||
└── mobile/
|
└── mobile/
|
||||||
├── localizes/ # Localized textures for mobile
|
├── localizes/ # Mobile textures for each language
|
||||||
├── postloads/ # Mobile textures loaded after startup
|
├── postloads/ # Mobile textures loaded after startup (default: en)
|
||||||
└── preloads/ # Mobile textures loaded at startup
|
└── preloads/ # Mobile textures loaded at startup (default: en)
|
||||||
```
|
```
|
||||||
sprite trong `preloads`, `postloads`: defaut là en
|
|
||||||
|
- Assets in `localizes/` are organized by language code (e.g., `zh`, `th`, `id`).
|
||||||
|
- Sprites in `preloads/` and `postloads/` use English (`en`) as the default language.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### Meta JSON Merger (Cocos Creator Editor Extension)
|
||||||
|
|
||||||
|
##### Purpose
|
||||||
|
|
||||||
|
Merges multiple JSON metadata files from `library/imports/` into one consolidated file (`fullMetaData.json`) to streamline asset management and build optimization.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
##### Features
|
||||||
|
|
||||||
|
- Recursively collects `.json` files (excluding `fullMetaData.json`)
|
||||||
|
- Filters out:
|
||||||
|
- `cc.SceneAsset`
|
||||||
|
- `cc.Prefab`
|
||||||
|
|
||||||
|
##### Example
|
||||||
|
|
||||||
|
- **Input**: `{Project}/library/imports/**/*.json`
|
||||||
|
- **Output**: `{Project}/library/imports/fullMetaData.json`
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"asset1.json": { /* metadata */ },
|
||||||
|
"asset2.json": { /* metadata */ }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
---
|
||||||
|
|
||||||
|
#### Texture Compression Tool (Cocos Creator Extension)
|
||||||
|
|
||||||
|
##### Purpose
|
||||||
|
|
||||||
|
This editor extension manages texture compression settings for game assets to optimize performance and build size.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
##### Compression Settings
|
||||||
|
| Description | Action Compress Texture |
|
||||||
|
|:----------- |:----------------------:|
|
||||||
|
| Compresses all textures in:<br/>- `assets/Core`<br/>- `assets/game` |  |
|
||||||
|
| Compresses all textures in:<br/>- `assets/game` only |  |
|
||||||
|
| Removes all compression settings |  |
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
Compression settings for PNG and JPG formats:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
##### Workflow
|
||||||
|
|
||||||
|
1. **Query** texture assets by UUID
|
||||||
|
2. **Apply** compression settings to their meta data
|
||||||
|
3. **Save** updated meta files
|
||||||
|
4. **Log** progress and handle errors in console
|
||||||
|
|
||||||
|
##### Benefits
|
||||||
|
|
||||||
|
* Reduces texture file sizes
|
||||||
|
* Speeds up builds and runtime loading
|
||||||
|
* Supports platform-specific formats
|
||||||
|
* Batch processing for efficiency
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### Remove Packable Texture – Cocos Creator Tool
|
||||||
|
|
||||||
|
##### Overview
|
||||||
|
|
||||||
|
This editor extension removes the `packable` flag from all texture assets in your project, preventing them from being packed into texture atlases.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
##### Why Remove Packable
|
||||||
|
|
||||||
|
Removing the `packable` flag gives you:
|
||||||
|
- **Better memory management** – load/unload textures individually
|
||||||
|
- **Prevents automatic atlas generation** – useful for large or dynamic textures
|
||||||
|
|
||||||
|
###### Use Cases
|
||||||
|
- Large background images
|
||||||
|
- Special effects (particles, dynamic textures)
|
||||||
|
- Render textures
|
||||||
|
- Dynamically loaded assets
|
||||||
|
- High-res UI elements with custom compression needs
|
||||||
|
|
||||||
|
##### Query Texture
|
||||||
|
|
||||||
|
- Scans `db://assets/**/*` for all texture assets.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
Compression settings for PNG and JPG formats:
|
||||||
|

|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
BIN
docs/04-game-asset-structure/img/compress-over.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
docs/04-game-asset-structure/img/compress-setting.png
Normal file
After Width: | Height: | Size: 119 KiB |
BIN
docs/04-game-asset-structure/img/compress-texture.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
docs/04-game-asset-structure/img/compress-texture1.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
docs/04-game-asset-structure/img/compress-texture2.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
docs/04-game-asset-structure/img/merge-json-assets.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
docs/04-game-asset-structure/img/remove-packable-texture.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
docs/04-game-asset-structure/img/remove-packable.png
Normal file
After Width: | Height: | Size: 27 KiB |