【正式版本已发布】 Cocos Creator 3.8.4 社区公测帖

你是3.8.2的?

image

我看看,我记得好像3.8.3已经修复过类似的问题

刚刚遇到!

来顶你一下。点击两下Rotate才能正常

skeleton.ts中,__preload被调用的事件滞后了?
项目里面有一些prefab中的sp.skeleton节点是默认active=false的,当active=true的同一帧进行setAnimation,此时函数中的this._skeleton为空就错了。
对比3.7.4,3.7.4在active=true后可以及时的调用__preload,把this._skeleton被赋值。
而3.8.4,在active=true后setAnimation调用之前,并没有发现__preload被调用。这就是问题所在了。
和之前的行为不同。

目前我的解决方法,就是当spine动画在如上条件使用时,在调用setAnimation前面加个_updateSkeletonData

        nodeSpine.getComponent(sp.Skeleton)._updateSkeletonData();
        nodeSpine.getComponent(sp.Skeleton).setAnimation(0, "dakai", false);

发现用到的地方有点多,直接给改成这样:

sp.Skeleton.prototype.setAnimation = function (trackIndex: number, name: string, loop?: boolean) {
    if (!(typeof name === 'string')) {
        logID(7511);
        return null;
    }

    if (this._skeleton == null) { // fix 
        this._updateSkeletonData();
    }

    const animation = this._skeleton.data.findAnimation(name);
    if (!animation) {
        logID(7509, name);
        return null;
    }
    let trackEntry /*: spine.TrackEntry | null */ = null;
    if (loop === undefined) loop = true;
    this._playTimes = loop ? 0 : 1;
    if (this.isAnimationCached()) {
        if (trackIndex !== 0) {
            warn('Track index can not greater than 0 in cached mode.');
        }
        if (!this._skeletonCache) return null;
        let cache = this._skeletonCache.getAnimationCache(this._skeletonData!.uuid, name);
        if (!cache) {
            cache = this._skeletonCache.initAnimationCache(this.skeletonData!.uuid, this._skeletonData!, name);
            cache?.setSkin(this._skinName);
        }
        if (cache) {
            this._animationName = name;
            this._isAniComplete = false;
            this._accTime = 0;
            this._playCount = 0;
            this._animCache = cache;
            if (this._socketNodes.size > 0) {
                this._animCache.enableCacheAttachedInfo();
            }
            this._animCache.updateToFrame(0);
            this._curFrame = this._animCache.frames[0];
        }
    } else {
        this._animationName = name;
        trackEntry = this._instance!.setAnimation(trackIndex, name, loop);
    }
    this.markForUpdateRenderData();
    return trackEntry;
}

TexturePacker输出的图集在android上错乱了,好像都是一个个的大图,没被拆开

384正式版发布后,会考虑多版本支持情况,到时有进展会及时更新到 cocos-engine仓库的issue上,麻烦跟进。谢谢

你好,是否有可复现问题的步骤,以及相关demo?

我这边也遇到了,有人知道怎么回事吗

那3.8.5能用上4.0么。。。 :joy:

哈哈哈哈,问就是没有

要啥自行车

先添加到parent里,后active,这边测试是正常。

image ; 引擎要求需要有父节点后才会执行preload

box2d有概率报这个错误

十一前会发吗。。。

之前3.6.2升3.7.4,遇到了自己写的shader需要修改一下,也不知是不是一个问题。
layout(set = 2, binding = 12/11/)

测试资源冲突了,估计来不及。和我之前说的,从第二轮的社区版和最终版本不会有太大区别,主要是优化管线性能。可以先用社区版本,到时替换为正式版本就好了。

:joy:你们并行了多少个项目

可能等到ccc4.x才能支持spine4.x 哦不对 我估计永远支持不到最新