[SOLVED] Animation does not start in build


I am facing an issue where my animation (which works fine in the editor, being set to Activated and Loop on true) does not play in the build, and am also unable to start the animation by code.

As you can see, it works fine in the editor, but appears to not move at all after I press launch.
image (The window remains closed)
I have searched around the forum if people encountered the same issues, but I could not find anything that specifically mentioned that an animation failed to play like it normally should on start. The only other topics that I found were about an animation that did not stop playing or had to be run in reverse…

I unfortunately cannot share a project with you, and making a clean project with the object and animation has not been very succesfull, so I hope that my screenshots can go a long way already…

Kind regards,


– EDIT –
For the people who don’t want to scroll down too far;

Solution: The model was part of a batch-group, so the animation did not start, even though it was loaded in.


That’s interesting, I haven’t encountered any similar issue with animation. Are you seeing any errors in the browser console when you launch your project?

Nope, none at all. Except for Google Ads throwing two because I have Adblock enabled.
If I do press the “play animation button” that I made, it catches the event and fires off the code that it’s supposed to.
image image
I saw a post somewhere on an animation not being run correctly, hence the forloop which then logs the currentTime of the animation.

Even tried making sure that the string variable this.AnimationName would actually make a string.
Setting the string manually also does not throw an error if there’s not an animation with that string.
Checking the animationObject entity’s animation element, to verify that there is an actual animation asset attached to the object.
I even tried “Take 001” as a name for the animation to play, but alas.

Hmm, a simple empty project with the model in question to take a look would help tons here. Especially to confirm if it’s a bug, since your code seems to be correct.

Asking if I am allowed to share the model in an empty scene. Will update once I hear back.

1 Like

So we’ve placed the model and animation in a new project, where it’s playing just fine, would you like me to share a link to that project?
Maybe there’s a setting somewhere that disables animations globally?

Sharing a link to the project where it plays fine isn’t necessary. What would help is sharing a link to the project where the animation isn’t playing.

What I would double check is if any other part of the codebase disables the animation component or overwrites any of the animation settings you put in place in editor. Also disable for the moment batching if you are using it on the model component.

Since there is no global switch to disable animation, it should work.

Ah, the model is part of a batch group in order to load it back in on scene change.
I am pretty sure nothing else targets the animation component, except for this one script only. Even when the settings get overridden, the console exposed variables show that it should be playing etc.

I just removed the batch group, and it plays the animation just fine

1 Like

Ah right, nice catch, indeed batching with skinned models doesn’t work currently.


Alright well, thanks for the help, now we finally don’t have to break any more heads over why the animation is not playing.


1 Like