AnimationClip.updateEventDatas 在3.3.0废弃了,替换的方法是什么呢

updateEventDatas

updateEventDatas : void

提交事件数据的修改。 当你修改了 this.events 时,必须调用 this.updateEventDatas() 使修改生效。

deprecated Since V3.3. Please reference to the track/channel/curve mechanism introduced in V3.3.

API文档里说的 track/channel/curve 在哪里啊

顶一个,我也想知道

https://github.com/cocos-creator/engine/pull/9246

追一下 code, 原本 updateEventDatas 是這樣寫的…

    public updateEventDatas () {
        // EMPTY
        this.events = this._events;
    }

現在過期不推薦了,所以…改成這樣吧

    const anim = this.node.getComponent(Animation);
    anim.defaultClip.events = [
      ...anim.defaultClip.events,
      {
        frame: 0.5,
        func: "toShowDone",
        params: [],
      },
    ];

這次參考樓上大大的連結