Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改部分文档 #913

Merged
merged 1 commit into from
May 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
修改部分文档
  • Loading branch information
xunyi0 committed May 17, 2019
commit 9c2dde4b50a8052f23a7c034f763223727cfab41
2 changes: 1 addition & 1 deletion en/advanced-topics/hot-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ In order to allow the game to detect remote versions, you can simulate a remote

### Publish the original version

After downloading the sample project, you can use Cocos Creator to open the project directly. Open **Build** panel, build for native platform, you can choose Windows / Mac as target to test.
After downloading the sample project, you can use Cocos Creator to open the project directly. Open **Build** panel, build for native platform, you can choose Windows / Mac as target to test. **Note**: Do not check MD5 Cache when building, otherwise it will cause the hot update to be invalid.

After building a successful native version, open the folder of the native published package, add the search path logic to `main.js`:

Expand Down
4 changes: 2 additions & 2 deletions en/extension/ipc-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ When timeout triggerred, a timeout error will reply:

```js
Editor.Ipc.sendToMain('foobar:greeting', function (error, answer) {
if ( error.code === 'ETIMEOUT' ) { //check the error code to confirm a timeout
if ( error && error.code === 'ETIMEOUT' ) { //check the error code to confirm a timeout
Editor.error('Timeout for ipc message foobar:greeting');
return;
}
Editor.log(answer);
});
```
```
2 changes: 1 addition & 1 deletion zh/advanced-topics/hot-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Manifest 文件中包含以下几个重要信息:

### 打包原生版本

下载完成范例工程后,可以用 Cocos Creator 直接打开这个工程。打开 **构建发布** 面板,构建原生版本,建议使用 Windows / Mac 来测试。
下载完成范例工程后,可以用 Cocos Creator 直接打开这个工程。打开 **构建发布** 面板,构建原生版本,建议使用 Windows / Mac 来测试。**注意**:构建时请不要勾选 MD5 Cache,否则会导致热更新无效。

构建成功原生版本之后,打开原生发布包的地址,给 `main.js` 附加上搜索路径设置的逻辑:

Expand Down
6 changes: 3 additions & 3 deletions zh/extension/extends-main-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ Cocos Creator 的主菜单是可以自由扩展的。扩展方法为在 `package

为了避免用户安装多个插件时,每个插件随意注册菜单项,降低可用性,我们推荐所有编辑器扩展插件的菜单都放在统一的菜单分类里,并以插件包名对不同插件的菜单项进行划分。

插件专用的菜单分类路径是 `i18n:MAIN_MENU.package`,在中文语言环境会显示为一级菜单 `插件`,接下来的二级菜单路径名应该是插件的包名,最后的三级路径是具体的菜单项功能,如:
插件专用的菜单分类路径是 `i18n:MAIN_MENU.package.title`,在中文语言环境会显示为一级菜单 `插件`,接下来的二级菜单路径名应该是插件的包名,最后的三级路径是具体的菜单项功能,如:

`i18n:MAIN_MENU.package/FooBar/Bar`
`i18n:MAIN_MENU.package.title/FooBar/Bar`

在中文环境的编辑器下就会显示如 `插件/FooBar/Bar` 这样的菜单。

`i18n:MAIN_MENU.package` 是多语言专用的路径表示方法,详情请见 [扩展包多语言化](i18n.md) 文档。
`i18n:MAIN_MENU.package.title` 是多语言专用的路径表示方法,详情请见 [扩展包多语言化](i18n.md) 文档。
4 changes: 2 additions & 2 deletions zh/extension/ipc-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ Editor.Panel.extends({

```js
Editor.Ipc.sendToMain('foobar:greeting', function (error, answer) {
if ( error.code === 'ETIMEOUT' ) { //check the error code to confirm a timeout
if ( error && error.code === 'ETIMEOUT' ) { //check the error code to confirm a timeout
Editor.error('Timeout for ipc message foobar:greeting');
return;
}
Editor.log(answer);
});
```
```