编辑器预览是指在编辑器用gameview运行还是小窗得预览呢
给个demo
https://gitee.com/cocos2d-zp/xforge-ui
gameview运行,代码在UIMgrShade.ts里面
运行起来后,先点登陆进入主页面,然后那个弹窗按钮页面渲染就会卡住,我测试了383和385
试试这个 pr
cocos官方必须收编这大佬 做布道师
,试了下,gameview运行是正常的了
IOS没运行起来,报错信息反馈在了385帖子里面
我i人
又发现一个问题,如果切换到新管线,截图功能就会什么都截不到,老管线是正常的。
还是那个demo,用384或者385切换新管线。
或者有其他好办法实现全屏截图吗?
框架
扩展包
更新
- cc-store 不再基于Mobx实现响应式,构建后代码体积由200K降低至2K
import {createStore, bindStore, stopBind, watchStore, stopWatch} from 'db://pkg/@gamex/cc-store';
// store.game
export default class Game implements IStore<Game> {
// 将当前实例转成Store
constructor() {
return createStore(this); // return不可忽略
}
// 状态
name = 'cc';
count = 0;
// 更新状态
setCount(count: number) {
this.count = count;
}
}
// PageHome.ts
onCountChange() {
// 支持任意条件分支
if(app.store.game.count > 10){
this.label2.string = `count: ${app.store.game.name}`;
} else {
this.label2.string = `count: ${app.store.game.count}`;
}
}
onLoad() {
// 监听状态变化
watchStore(this.onCountChange, this);
// 状态与组件属性绑定
bindStore(this.label, 'string', () => {
return app.store.game.count.toString();
});
// 状态与节点属性绑定
bindStore(this.label.node, 'active', () => {
return app.store.game.count % 2 == 0;
});
app.store.game.setCount(10);
}
onDestroy() {
stopBind(this.label, 'string');
stopBind(this.label.node, 'active');
stopWatch(this.onCountChange, this);
}
或者这样创建响应式对象也可以
const store = createStore({
name:'cc',
count:18
})
或者这样
const store = new class {
// 将当前实例转成Store
constructor() {
return createStore(this); // return不可忽略
}
// 状态
name = 'cc';
count = 0;
// 更新状态
setCount(count: number) {
this.count = count;
}
}
2赞
大佬牛逼!
牛逼了!大佬
框架好像没有看到 数据配置表相关内容?
这个没有,论坛和商店有不少这方面的工具
插眼mark…
框架
更新
- SoundManager的API中添加bundle参数,允许播放其它Bundle中的音频
修复
- UIMgrLoading会错误的旋转根节点,导致触摸屏蔽可能异常
请问这个是基于单场景吗还是可以切换场景
可以基于单场景,也可以基于多场景。Page类型的View可以选择是2D模式还是3D模式,2D模式就是使用Prefab当场景管理,3D模式就是Scene多场景管理。
