Skip to content

Commit 4759938

Browse files
EricCorleoneslackmoehrlexunyi0
authored
翻译项目结构 (cocos#1571)
* 翻译项目结构 * Apply suggestions from code review Co-authored-by: Slack-Moehrle <[email protected]> * Apply suggestions from code review Co-authored-by: yufang.wu <[email protected]> Co-authored-by: Slack-Moehrle <[email protected]> * Update en/getting-started/project-structure/index.md * 修改路径。 Co-authored-by: Slack-Moehrle <[email protected]> Co-authored-by: yufang.wu <[email protected]>
1 parent 16aedc5 commit 4759938

File tree

3 files changed

+75
-8
lines changed

3 files changed

+75
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Project Structure
2+
3+
Using the Dashboard, a new project can be created. `HelloWorld` is the classic first example. Once created, the project has a specific folder structure, and this structure can be used to get familiar with the Cocos Creator project folder structure.
4+
5+
## Project Folder Structure
6+
7+
After creating and opening a Cocos Creator project for the first time, the developer project folder will have the following structure.
8+
9+
![project-file](index/project-file.png)
10+
11+
- `assets`: the assets directory
12+
13+
- `build`: build directory (generated after building a platform)
14+
15+
- `library`: directory of imported assets
16+
17+
- `local`: log files directory
18+
19+
- `profiles`: editor configuration
20+
21+
- `temp`: temporary files directory
22+
23+
- `package.json`: project configuration
24+
25+
### `assets`
26+
27+
`assets` is used to hold all local assets, scripts, and third-party library files in the game. Only the contents of the `assets` directory will be displayed in the **Assets** panel. Each file in `assets` generates a `.meta` file with the same name after importing the project, which is used to store the corresponding asset configuration and index information. The `.meta` file needs to be submitted to the version control system as well, please review the [Asset Management Notes --- meta Files](../../asset/meta.md) documentation.
28+
29+
Project or design source files generated by some third-party tools, such as `.tps` files for TexturePacker, or `.psd` files for Photoshop, can optionally be managed outside of `assets`.
30+
31+
### `build`
32+
33+
After publishing a project using the default publish path through **Project -> Build** in the editor main menu, the editor will create a `build` directory under the project path and store all builds for the target platform.
34+
35+
### `library`
36+
37+
The `library` is generated by importing the assets from `assets`, where the structure of the files and the format of the assets will be processed into the form needed for the final game release.
38+
39+
When `library` is lost or corrupted, just delete the whole `library` folder and open the project again, and the repository will be regenerated.
40+
41+
### `local`
42+
43+
The `local` folder contains configuration information for the project on the local machine, including the editor panel layout, window size, location, and other information. Developers do not need to care about the contents here.
44+
45+
### `profiles`
46+
47+
The `profiles` folder contains configuration information for the editor, including build configuration information for each target platform, scene configuration information, etc.
48+
49+
### `extensions`
50+
51+
The `extensions` folder is used to place custom extensions for this project. To install extensions manually, create this folder manually. To uninstall the extensions, just delete the corresponding folder in `extensions`.
52+
53+
### `settings`
54+
55+
`settings` contains project-specific settings, such as configuration information in the **Project Settings** panel. To synchronize project settings between developers, please add the settings directory to version control.
56+
57+
### `temp`
58+
59+
`temp` is a temporary folder for caching some of Cocos Creator's temporary files locally. This folder can be deleted manually after closing Cocos Creator, and developers don't need to care about the contents.
60+
61+
### `package.json`
62+
63+
The `package.json` file, together with the `assets` folder, serves as a flag to verify the legitimacy of a Cocos Creator project, and only folders that include these two contents can be opened as Cocos Creator projects. Developers don't need to care about the contents inside.
64+
65+
## Version control
66+
67+
Cocos Creator automatically generates `.gitignore` files when a new project is created to exclude files that should not be committed to the git repository. If using another version control system, or if needing to commit the project elsewhere, be careful to only commit `assets`, `extensions`, `settings`, `package.json`, and any other manually added files associated with the project.
Loading

zh/getting-started/project-structure/index.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88

99
![project-file](index/project-file.png)
1010

11-
- assets:资源目录
11+
- `assets`:资源目录
1212

13-
- build:构建目录(在构建某平台后会生成该目录)
13+
- `build`:构建目录(在构建某平台后会生成该目录)
1414

15-
- library:导入的资源目录
15+
- `library`:导入的资源目录
1616

17-
- local:日志文件目录
17+
- `local`:日志文件目录
1818

19-
- profiles:编辑器配置
19+
- `profiles`:编辑器配置
2020

21-
- temp:临时文件目录
21+
- `temp`:临时文件目录
2222

23-
- package.json:项目配置
23+
- `package.json`:项目配置
2424

2525
### 资源文件夹(assets)
2626

27-
`assets` 用来放置游戏中所有的本地资源、脚本和第三方库文件。只有在 `assets` 目录下的内容才能显示在 **资源管理器** 中。`assets` 中的每个文件在导入项目后都会生成一个相同名字的 `.meta` 文件,用于存储对应的资源配置和索引信息。`.meta` 文件需要一并提交到版本控制系统,详见 [资源管理注意事项 --- meta 文件](../../advanced-topics/meta.md)
27+
`assets` 用来放置游戏中所有的本地资源、脚本和第三方库文件。只有在 `assets` 目录下的内容才能显示在 **资源管理器** 中。`assets` 中的每个文件在导入项目后都会生成一个相同名字的 `.meta` 文件,用于存储对应的资源配置和索引信息。`.meta` 文件需要一并提交到版本控制系统,详见 [资源管理注意事项 --- meta 文件](../../asset/meta.md)
2828

2929
一些第三方工具生成的工程或设计源文件,如 TexturePacker 的 `.tps` 文件,或 Photoshop 的 `.psd` 文件,可以选择放在 `assets` 外面管理。
3030

0 commit comments

Comments
 (0)