[SOLVED] AnimationComponent gets broken when entities have the same name

Hey guys!

I’ve noticed that AnimationComponent is broken in the latest release (possibly after converting its code to ES6).
Here’s the link to the test project: https://playcanvas.com/project/756462/overview/broken-animationcomponent

The issues reveals when you clone an entity/instantiate a template. If the copy has the same name as the source entity/template, the animation component is broken.

In the attached project, only the first watermelon is animated, all the copies that share its name are broken. Setting unique name resolves the issue (see attached screenshot).

I’ve had a quick look at the changes and the possible issue root is here:

1 Like

Hi @Igor,

What error are you getting?

Forked your project and added that line and seems to be working fine:

(all watermelons rotate/animate)

Hi @Leonidas,

Please comment out/remove the line 28 on your screenshot (let them all have the same name).

I’ve opened an issue on github: https://github.com/playcanvas/engine/issues/2762
The AnimComponent worked well under v1.37.1, but got broken since 1.38.0

Issue demo link: https://launch.playcanvas.com/1073891?debug=true

The same scene works well under v1.37.1: https://launch.playcanvas.com/1073891?debug=true&use_local_engine=https://code.playcanvas.com/playcanvas-1.37.1.js

1 Like

Got it, you are right, it’s being reproduced now. This is definitely a bug, I will monitor your github issue, thanks for opening this.

1 Like

Fix is now deployed:

1 Like