Skip to content

Commit

Permalink
Merge pull request #2943 from MrKylinGithub/master
Browse files Browse the repository at this point in the history
feat(publish:all:pro):fixed some issues
  • Loading branch information
MrKylinGithub authored Jun 3, 2024
2 parents db2c36c + bd478bf commit 7e5d585
Show file tree
Hide file tree
Showing 18 changed files with 64 additions and 61 deletions.
2 changes: 0 additions & 2 deletions versions/2.4/en/cocos-service/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ The **Service** Panel currently supports the integration of third-party services

- [Cloud Functions (AppGallery Connect)](agc-cloudfunc.md)

- [Agora RTC](agora.md)

## Usage

- Open the Cocos Creator, choose **Menu bar -> Panel -> Service** to open the **Service** panel. Click the ![setting](index/setting.png) button above the **Service** panel. Select **Dashboard** and go to the [Cocos Account Center](https://auth.cocos.com/#/) to register your user account.
Expand Down
16 changes: 8 additions & 8 deletions versions/2.4/en/extension/reference/ipc-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ Query build options
#### scene:new-scene

Open a new scene in the editor.
```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:new-scene');
```

#### scene:play-on-device

Preview of the currently selected device.
```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:play-on-device');
```

#### scene:query-hierarchy

Query the hierarchy data in the current open scene.
```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-hierarchy', (error, sceneID, hierarchy) => {
if (error)
return Editor.error(error);
Expand All @@ -81,7 +81,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-hierarchy', (error, sceneID, hierar
#### scene:query-nodes-by-comp-name

Query the node that contains the specified component in the current scene.
```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-nodes-by-comp-name', 'cc.Sprite', (error, nodes) => {
if (error)
return Editor.error(error);
Expand All @@ -92,7 +92,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-nodes-by-comp-name', 'cc.Sprite', (
#### scene:query-node

Query the dump data of the specified node.
```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-node', '9608cbWFmVIM7m6hasLXYV7', (error, dump) => {
if (error)
return Editor.error(error);
Expand All @@ -103,7 +103,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-node', '9608cbWFmVIM7m6hasLXYV7', (
#### scene:query-node-info

Query the basic information of a node.
```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-node-info', '9608cbWFmVIM7m6hasLXYV7', 'cc.Node', (error, info) => {
if (error)
return Editor.error(error);
Expand All @@ -114,7 +114,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-node-info', '9608cbWFmVIM7m6hasLXYV
#### scene:query-node-functions

Query the component function that can be called on a node.
```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-node-functions', '9608cbWFmVIM7m6hasLXYV7', (error, functions) => {
if (error) {
return Editor.error(error);
Expand All @@ -126,7 +126,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-node-functions', '9608cbWFmVIM7m6ha
#### scene:query-animation-node

Query animation root node.
```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-animation-node', '9608cbWFmVIM7m6hasLXYV7', (error, dump) => {
if (error) {
return Editor.error(error);
Expand Down
5 changes: 0 additions & 5 deletions versions/2.4/zh/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@
- [服务面板操作指南](https://service.cocos.com/document/zh/user-guide.html)
- [计费和充值](https://service.cocos.com/document/zh/billing-and-charge.html)
- [服务列表](https://service.cocos.com/document/zh/#%E6%94%AF%E6%8C%81%E6%9C%8D%E5%8A%A1)
- [Cocos Analytics](https://service.cocos.com/document/zh/cocos-analytics.html)
- [声网(Agora RTC)](https://service.cocos.com/document/zh/agora.html)
- [云开发(腾讯云)](https://service.cocos.com/document/zh/tcb.html)
- [游戏联机对战引擎(腾讯云)](https://service.cocos.com/document/zh/mgobe.html)
- [游戏多媒体引擎(腾讯云)](https://service.cocos.com/document/zh/gme.html)
- [定位服务(HMS Core)](https://service.cocos.com/document/zh/hms-location.html)
- [分析服务(HMS Core)](https://service.cocos.com/document/zh/hms-analytics.html)
- [性能管理(AGC)](https://service.cocos.com/document/zh/agc-apm.html)
Expand Down
6 changes: 0 additions & 6 deletions versions/2.4/zh/cocos-service/about-cocos-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ Cocos Service 是集成在 Cocos Creator 内的服务面板,其中提供了一
## 支持服务

Cocos Service 目前支持集成以下服务:

- [Cocos Analytics](cocos-analytics.md):精准了解游戏的新增、活跃、留存、付费等数据。
- [声网(Agora RTC)](agora.md):实时音视频。
- [云开发(腾讯云)](tcb.md):Serverless 云端一体化产品方案,助力小程序、Web 应用、移动应用成功。
- [游戏联机对战引擎(腾讯云)](mgobe.md):实时、弹性扩容的高性能联机对战服务,快速构建游戏多人一起玩的能力。
- [游戏多媒体引擎(腾讯云)](gme.md):一站式语音解决方案,助力开发者快速实现各类语音功能。
- [定位服务(HMS Core)](hms-location.md):采用 GPS、Wi-Fi、基站等多种混合定位模式进行定位,赋予您的应用程序快速、精准地获取用户位置信息的能力。
- [分析服务(HMS Core)](hms-analytics.md):基于开发者上报的用户行为和属性数据,提供多种分析能力。
- [性能管理(AppGallery Connect)](agc-apm.md):提供分钟级应用性能监控能力,收集应用性能数据。
Expand Down
9 changes: 2 additions & 7 deletions versions/2.4/zh/cocos-service/billing-and-charge.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Cocos Service 提供的服务有免费的,也有部分是付费的,具体在

## 腾讯云套餐购买方式

由于用户在 Service 面板中开通的腾讯云账号类型为子账号,所以无法直接在腾讯云后台购买腾讯云相关的资源包套餐(TCB/MGOBE/GME),因此我们提供了一套简易流程方便用户自助购买套餐。
由于用户在 Service 面板中开通的腾讯云账号类型为子账号,所以无法直接在腾讯云后台购买腾讯云相关的资源包套餐,因此我们提供了一套简易流程方便用户自助购买套餐。

1. 在腾讯云后台登录账号,选择要购买的套餐。

Expand All @@ -46,9 +46,4 @@ Cocos Service 提供的服务有免费的,也有部分是付费的,具体在

## 服务商计费说明

服务商具体的计费说明请参考:

- [Agora 官方计费说明](https://docs.agora.io/cn/Voice/billing_rtc?platform=All%20Platforms)
- [TCB 云开发计费说明](https://cloud.tencent.com/document/product/876/18864)
- [MGOBE 游戏联机对战引擎计费说明](https://cloud.tencent.com/document/product/1038/33293)
- [GME 游戏多媒体引擎计费说明](https://cloud.tencent.com/document/product/607/38500)
服务商具体的计费说明请参考:
11 changes: 0 additions & 11 deletions versions/2.4/zh/cocos-service/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ Cocos Service 是集成在 Cocos Creator 内的服务面板。我们甄选优质

Cocos Service 目前提供的服务包括:

- [Cocos 数据统计](https://www.cocos.com/analytics/):精准了解游戏的新增、活跃、留存、付费等数据。
- [声网(Agora RTC)](https://www.agora.io/cn/):游戏内置实时音视频 SDK。
- [云开发(腾讯云)](https://cloud.tencent.com/product/tcb):Serverless 云端一体化产品方案,助力小程序、Web 应用、移动应用成功。
- [游戏联机对战引擎(腾讯云)](https://cloud.tencent.com/product/mgobe):实时、弹性扩容的高性能联机对战服务,快速构建游戏多人一起玩的能力。
- [游戏多媒体引擎(腾讯云)](https://cloud.tencent.com/product/gme):一站式语音解决方案,助力开发者快速实现各类语音功能。
- [定位服务(HMS Core)](https://developer.huawei.com/consumer/cn/hms/huawei-locationkit):采用 GPS、Wi-Fi、基站等多种混合定位模式进行定位,赋予您的应用程序快速、精准地获取用户位置信息的能力。
- [分析服务(HMS Core)](https://developer.huawei.com/consumer/cn/hms/huawei-analyticskit):基于开发者上报的用户行为和属性数据,提供多种分析能力。
- [性能管理(AppGallery Connect)](https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/agc-apms-introduction):实时性能报告,帮助改善应用性能。
Expand All @@ -34,12 +29,6 @@ Cocos Service 目前提供的服务包括:
- [服务面板操作指南](user-guide.md)
- [计费与充值](billing-and-charge.md)
- [服务列表](service-index.md)
- [Cocos Analytics 统计](cocos-analytics.md)
- [声网(Agora RTC)](agora.md)
- [云开发(腾讯云)](tcb.md)
- [游戏联机对战引擎(腾讯云)](mgobe.md)
- [游戏多媒体引擎(腾讯云)](gme.md)
- [接口文档](gme-api-docs.md)
- [定位服务(HMS Core)](hms-location.md)
- [分析服务(HMS Core)](hms-analytics.md)
- [性能管理(AppGallery Connect)](agc-apm.md)
Expand Down
6 changes: 0 additions & 6 deletions versions/2.4/zh/cocos-service/service-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
# 服务列表

- [Cocos Analytics](cocos-analytics.md)
- [声网(Agora RTC)](agora.md)
- [云开发(腾讯云)](tcb.md)
- [游戏联机对战引擎(腾讯云)](mgobe.md)
- [游戏多媒体引擎(腾讯云)](gme.md)
- [接口文档](gme-api-docs.md)
- [定位服务(HMS Core)](hms-location.md)
- [分析服务(HMS Core)](hms-analytics.md)
- [性能管理(AppGallery Connect)](agc-apm.md)
Expand Down
16 changes: 8 additions & 8 deletions versions/2.4/zh/extension/reference/ipc-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,23 @@ Creator 内置的一些组件,或者插件,在某些操作下,会向所有

在编辑器内打开一个新的场景。

```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:new-scene');
```

### scene:play-on-device

使用界面上当前选中的预览设备来进行预览。

```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:play-on-device');
```

### scene:query-hierarchy

查询编辑器内当前打开场景里的 hierarchy 数据。

```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-hierarchy', (error, sceneID, hierarchy) => {
if (error)
return Editor.error(error);
Expand All @@ -98,7 +98,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-hierarchy', (error, sceneID, hierar

传入一个 Component 名字,返回场景内含有这个组件的节点数组。

```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-nodes-by-comp-name', 'cc.Sprite', (error, nodes) => {
if (error)
return Editor.error(error);
Expand All @@ -110,7 +110,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-nodes-by-comp-name', 'cc.Sprite', (

发送一个节点 id,查询这个节点的 dump 数据。dump 数据是一个字符串,需要使用 JSON 手动转成 Object 使用。

```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-node', '9608cbWFmVIM7m6hasLXYV7', (error, dump) => {
if (error)
return Editor.error(error);
Expand All @@ -122,7 +122,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-node', '9608cbWFmVIM7m6hasLXYV7', (

传入一个节点或者组件的 id 与一个类型,返回查询的节点的基本信息。

```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-node-info', '9608cbWFmVIM7m6hasLXYV7', 'cc.Node', (error, info) => {
if (error)
return Editor.error(error);
Expand All @@ -134,7 +134,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-node-info', '9608cbWFmVIM7m6hasLXYV

传入一个节点 id,返回这个节点上所有组件内的函数

```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-node-functions', '9608cbWFmVIM7m6hasLXYV7', (error, functions) => {
if (error) {
return Editor.error(error);
Expand All @@ -146,7 +146,7 @@ Editor.Ipc.sendToPanel('scene', 'scene:query-node-functions', '9608cbWFmVIM7m6ha
### scene:query-animation-node

传入一个节点 id,根据这个节点查找最近的动画根节点。并返回这个节点的 dump 数据。
```javacript
```javascript
Editor.Ipc.sendToPanel('scene', 'scene:query-animation-node', '9608cbWFmVIM7m6hasLXYV7', (error, dump) => {
if (error) {
return Editor.error(error);
Expand Down
1 change: 0 additions & 1 deletion versions/2.4/zh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Cocos(雅基软件)多年来不断发展,已经发布了多个与 Cocos Cr
- 从 v2.4.0 开始,Cocos Creator 重写了资源管理模块,兼容了大部分原有的 API。除个别项目使用了无法兼容的特殊用法的 API 必须手动升级外,大部分项目都可以照常运行。建议开发者都升级到最新的资源管理模块。详情请查阅 [v2.4 资源管理模块升级指南](release-notes/asset-manager-upgrade-guide.md)[v2.4 资源分包升级指南](release-notes/subpackage-upgrade-guide.md)
- 从 v2.4.0 开始,Cocos Creator 正式支持了 Asset Bundle,提供了更强大的远程资源加载能力、子项目动态加载能力,并进一步减小了首包的大小。详情请查阅 [Asset Bundle](scripting/asset-bundle.md)
- 从 v2.4.0 开始,编辑器的构建流程将以 Asset Bundle 为单元。如果开发者在 v2.4 之前有在编辑器中使用插件扩展了构建流程,则需要对部分 API 的使用进行升级。详情请查阅 [定制构建流程升级指南](release-notes/build-extend-upgrade-guide.md)
- 从 v2.3.4 开始,Cocos Creator 新增了对 [腾讯云服务](cocos-service/tcb.md) 的支持。
- 从 v2.3.0 开始,Cocos Creator 新增了对 [3D 物理与碰撞系统](physics-3d/index.md)[3D 粒子](3d/particle-system-3d.md) 的支持,同时 [材质系统](render/index.md) 也升级到了正式版。
- [Spine 换装指南](components/spine.md#spine-%E6%8D%A2%E8%A3%85)
- [DragonBones 换装指南](components/dragonbones.md)
Expand Down
2 changes: 1 addition & 1 deletion versions/2.4/zh/scripting/javascript-primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ a = 0;

- 使用驼峰命名法:定义 `myRandomVariable` 这样的变量名,而不是 `my_random_variable`
- 在每一行结束时写一个 `;`,尽管在 JavaScript 里行尾的 `;` 是可以忽略的
- 在每个关键字前后都加上空格,如 `a = b + 1`,而不是 `a = b + 1`
- 在每个关键字前后都加上空格,如 `a = b + 1`,而不是 `a=b+1`

## 组合我们学到的知识

Expand Down
4 changes: 2 additions & 2 deletions versions/3.8/en/ui-system/components/editor/scrollview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ScrollView Component Reference

__ScrollView__ is a container with a scroll function. It provides a way to browse more contents within a limited display area. Generally, ScrollView will be used along with the __Mask__ component and the __ScrollBar__ component can also be added to show the current offset location within the browsing content.
__ScrollView__ is a container with a scroll function. It provides a way to browse more contents within a limited display area. Generally, ScrollView will be used along with the [__Mask__ component](./mask.md) and the [__ScrollBar__ component](./scrollbar.md) can also be added to show the current offset location within the browsing content.

![scrollview-content](scroll/scrollview-content.png)

Expand Down Expand Up @@ -50,7 +50,7 @@ Normally a ScrollView node tree resembles the following:

![scrollview-hierarchy](scroll/scrollview-hierarchy.png)

The `view` here is used to define a scroll area that can be displayed. As a result, the Mask will normally be added to the `view`. Contents that can scroll can be put in the content node or added to its child node.
The `view` here is used to define a scroll area that can be displayed. As a result, the [Mask Component](./mask.md) will normally be added to the `view`. Contents that can scroll can be put in the content node or added to its child node.

## Add a callback through the script code

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@ Click the **Add Component** button at the bottom of the **Inspector** panel and
| **Distance** | The distance from the camera is calculated for normal display. Adjust the best position according to the illumination effect of the model under the camera, and use this position as the dividing line to calculate the proportion in the viewport. |
| **SyncEvents** | Map data events. The first parameter of the callback is the local coordinates after mapping, and the second is the distance ratio from the camera. |

## SyncEvents

You can use method likes `onSyncEvents(localUIPos:Vec3,distanceScale: number,customEventData: string)` to handle the `SyncEvents`

Parematers as following:

- `localUIPos:Vec3` ui coordinates after mapping
- `distanceScale: number` distance ratio from camera
- `customEventData: string` customize data, can be configured on the Inspector panel.

For specific usage, please refer to the **rocker** scene in the [UI display example](https://github.com/cocos/cocos-example-ui/tree/v3.0/assets/scene).
18 changes: 18 additions & 0 deletions versions/3.8/zh/advanced-topics/oc-reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ var ret = native.reflection.callStaticMethod("NativeOcClass",
调用示例如下:

```c++
#include "application/ApplicationManager.h"
#include "cocos/bindings/jswrapper/SeApi.h"

CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=](){
se::ScriptEngine::getInstance()->evalString(script.c_str());
});
Expand All @@ -137,6 +140,9 @@ window.callByNative = function(){
然后像下面这样调用:

```c++
#include "application/ApplicationManager.h"
#include "cocos/bindings/jswrapper/SeApi.h"

CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=](){
se::ScriptEngine::getInstance()->evalString("window.callByNative()");
});
Expand All @@ -145,6 +151,9 @@ CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=](){
或者:
```c++
#include "application/ApplicationManager.h"
#include "cocos/bindings/jswrapper/SeApi.h"
CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=](){
se::ScriptEngine::getInstance()->evalString("callByNative()");
});
Expand All @@ -167,6 +176,9 @@ window.NativeAPI = NativeAPI;
我们可以像这样调用:

```c++
#include "application/ApplicationManager.h"
#include "cocos/bindings/jswrapper/SeApi.h"

CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=](){
se::ScriptEngine::getInstance()->evalString("NativeAPI.callByNative()");
});
Expand Down Expand Up @@ -199,6 +211,9 @@ window.NativeAPIMgr = NativeAPIMgr;
我们可以像下面这样调用:

```c++
#include "application/ApplicationManager.h"
#include "cocos/bindings/jswrapper/SeApi.h"

CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=](){
se::ScriptEngine::getInstance()->evalString("NativeAPIMgr.inst.callByNative()");
});
Expand All @@ -219,6 +234,9 @@ window.callByNative = function(a:string, b:number, c:bool){
可像这样调用:

```c++
#include "application/ApplicationManager.h"
#include "cocos/bindings/jswrapper/SeApi.h"

CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=](){
se::ScriptEngine::getInstance()->evalString("window.callByNative('test',1,true)");
});
Expand Down
2 changes: 2 additions & 0 deletions versions/3.8/zh/advanced-topics/thread-safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
如果写的 Objective-C 或者 C++ 代码想要确保线程安全,可以通过 `CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread` 方法让代码在 GL 线程中执行。

```c++
#include "application/ApplicationManager.h"

CC_CURRENT_ENGINE()->getScheduler()->performFunctionInCocosThread([=](){
//TO DO
});
Expand Down
2 changes: 1 addition & 1 deletion versions/3.8/zh/release-notes/upgrade-guide-v3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ Cocos Creator 3.x 开启了 TypeScript 的严格模式,会对代码进行更

如果不想使用严格模式,可以在 Creator 顶部菜单栏的 **项目 -> 项目设置 -> 脚本** 中勾选 **启用宽松模式**。需要提醒的是,我们并不鼓励关闭严格模式,因为严格空值检查能够减少代码运行时的一些低级报错。

关于严格模式下的书写规范,可以参照官方案例 **快上车 3D**([GitHub](https://github.com/cocos/cocos-tutorial-taxi-game) | [Gitee](https://gitee.com/mirrors_cocos-creator/tutorial-taxi-game))
关于严格模式下的书写规范,可以参照官方案例 快上车 3D([GitHub](https://github.com/cocos/cocos-tutorial-taxi-game)。

### Action 动作全都失效

Expand Down
1 change: 0 additions & 1 deletion versions/3.8/zh/ui-system/components/editor/mask.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Mask 用于规定子节点可渲染的范围,默认带有 Mask 组件的节点

遮罩的组件接口请参考 [Mask API](%__APIDOC__%/zh/class/Mask)

关于使用可以参考范例 **Mask**[GitHub](https://github.com/cocos/cocos-test-projects/tree/v3.8/assets/cases/ui/08.mask) | [Gitee](https://gitee.com/mirrors_cocos-creator/test-cases-3d/tree/v3.8/assets/cases/ui/08.mask))。

添加 Mask 组件后,会自动添加 [Graphics](./graphics.md) 组件,请不要删除该组件。在 Type 为 **SPRITE_STENCIL** 时,Mask 组件会添加 Sprite 组件,该 Sprite 组件会为模板提供形状,同理请勿删除。

Expand Down
Loading

0 comments on commit 7e5d585

Please sign in to comment.