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
heronode. - Add the
Cocosprefab to theheronode. - Create the
PlayerControllerscript, and add all the code as shown in the video, including creating acocosAnimproperty, of typeAnimation. - In Cocos Creator, drag the
Cocosnode into thehero'sCocos Animproperty. - In the
PlayerControllerscript, make sure to callthis.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
