Label太多了合批有啥好的处理方式没?
你好,问题定位到了,值被错误转换导致的,这个修复会在下次的3.8.6版本带上,感谢!
如果是列表的话可以研究修改源码实现分层合批,
如果比较散的话可以试试98k大佬的多纹理合批插件
98k大佬的多纹理合批
希望在这个设置宽高的位置增加一个锁定宽高比的选项
你说到点上了,类似ps
uniform sampler2DArray textures;
color = texture(u_textureArray, vec3(v_uv0, u_idx));
sampler2DArray可以使用吗?
3.8.x,Spine内存泄漏,我用的3.8.6最新版本(github也没看到有相关的修复)
放好多个spine在场景中,没写逻辑,设置一个动画循环播放,内存就会一直分配,直到超过默认32M
然后wasm内存增长,一直到超过最大内存限制
在我们项目中,微信真机ios一直挂机,1h就会爆,报错table index out of bounds(应该跟这个有关)
这个是通过重新编译Spine Wasm,增加内存检查的页面查看的
@song2008_2001 @Knox @dumganhar @Yuan2333
有一些堆栈
理论上可以,但不是所有平台都支持。
spine::Vector::setSize() 有泄露,提了个 PR 给官方:
你可以这样改下,重新生成 wasm 替换验证看看。替换需要在构建面板右上角清除引擎缓存才能生效。
此问题会在 3.8.6 中修复。感谢反馈。
问题:
在3d场景渲染 2d spine,spine 与 spine 之间的深度测试错误,运行 cocos-test-projects 的 2d-rendering-in-3d 。
运行环境:
window10 v3.8.6-228
步骤如下:
2d-rendering-in-3d 测试例子我做了一点修改,因为原始场景只有一个 spine,我复制了一份,如下图
并重设各自的 z 值如下图:
3d 长方体的 z 值也做了修改方便对比:
运行效果如下图:
从运行效果可以看出来,两个 spine 与 3d 模型之间的深度测试正常,但是两个spine之间的深度测试出现异常,请问这是正常现象吗,如何设置才能达到 spine 之间的深度测试也正常
386的本地坐标和世界坐标转换是不是有点问题?
这是节点层级截图
这是场景,场景中的红色球体是我想要的正确结果,本地坐标是(1.25, 0.8, 2.22)
圆柱体是我用代码转换坐标后的位置,本地坐标竟然变成了转换后的世界坐标
demo代码
@ccclass(‘PfbParentTs’)
export class PfbParentTs extends Component {
@property(Prefab)
public pfbAdd: Prefab = null;
start() {
this.init();
}private init() { const addNode = instantiate(this.pfbAdd); const localPos = math.v3(1.25, 0.8, 2.22); const transPos = math.v3(); this.node.worldMatrix.transform(localPos).getTranslation(transPos); addNode.getComponent(PfbAddTs).initData(transPos); console.log(transPos); this.node.addChild(addNode); } update(deltaTime: number) { }
}
@ccclass(‘PfbAddTs’)
export class PfbAddTs extends Component {
public initData(pos:Vec3){ this.node.setWorldPosition(pos); } start() { } update(deltaTime: number) { }
}
@ccclass(‘SceneTs’)
export class SceneTs extends Component {
@property(Prefab) public pfbParent:Prefab=null; start() { this.init(); } private init(){ const pNode = instantiate(this.pfbParent); const worldPos = math.v3(12.45,3.4,15.68); pNode.setWorldPosition(worldPos); director.getScene().addChild(pNode); } update(deltaTime: number) { }
}
好的,谢谢,辛苦啦!
把你修改后的demo发来看看
3.8.5 没问题?
麻烦把这个 demo 上传一下吧。我们跟进一下。
大佬为什么会泄漏,我猜测是有可能有问题,但不确定。请解惑
修复后的代码,经过验证的确没有内存泄漏了
 为什么cocos 3.8.5 没有了cocos 2.4.10的 编辑器内调节动画路径的功能,还没有了两帧之间连线显示???但是我看文档怎么就有我的就没?