Cocos animation not compatible with 3.6.1

Hi. I’m excited to learn and use Cocos Creator. I’m following along with the tutorial on youtube (https://youtu.be/T_49AefgPxI), and I’ve encountered a problem. The Cocos asset’s animations are not compatible with the most recent version (3.6.1) of Cocos Creator.

  • Follow along with the tutorial (https://youtu.be/T_49AefgPxI)
  • Use the latest Creator version (3.6.1)
  • Create the hero node.
  • Add the Cocos prefab to the hero node.
  • Create the PlayerController script, and add all the code as shown in the video, including creating a cocosAnim property, of type Animation.
  • In Cocos Creator, drag the Cocos node into the hero's Cocos Anim property.
  • In the PlayerController script, make sure to call this.cocosAnim.play('cocos_anim_jump') in the click handler.
  • In Creator, Click “Play”.
  • Once the game starts in the browser, click anywhere in the game screen.

Result: the Cocos moves forward, but does not play the animation. Console output show that cocosAnim is null.

Every time you save the PlayerController code, it clears the cocosAnimation field from the hero node in Creator.

Following the tutorial with an earlier version (I tried 3.1.1) works just fine (the animation plays), but it doesn’t work with 3.6.1.

Here’s a lint to the project as is should exist at time 6:50 in the tutorial on youtube (https://youtu.be/T_49AefgPxI), and it doesn’t play the animation Tutorial Project

Is there an upgraded version of the Cocos asset that is compatible with 3.6.1?

Thanks!

Creator version: 3.6.1
OS: MacOS

it will be fixed in 3.6.2

1赞

You can unlink the prefab node to avoid this problem in 3.6.1
First select the “Cocos” Node,then click the button in this picture.
image

1赞