Why might I get an "MISSING anim model? clip#0 <GameObject name>" error when using Unity Timeline?

Hello! I’m trying to iron out some behavior when working with Unity Timeline (as usual) and getting this popup error in the upper-right when running my scene. This occurs in both Needle Engine versions 3.29.0 and 3.31.0 (latest).

The scene I’m running is pretty minimalistic, and contains only one timeline object, a character, and an animation on that timeline - though the animation on the timeline is embedded in a .glb file. The animation also fails to play in the scene, though regular expected behavior is restored (animation + no error) when I instead use a regular .anim file. Is there anything I can try to get this working with my .glb?

Original Post on Discord

by user 248501710404845568

Hello there – we have an experimental AI bot :robot: that might be able to help you with your question. Would you like to try this out?

How it works:
Reply to the messages of the bot that end with a thread_id to interact with it and ask follow-up questions. You can also mention the bot directly in this channel to get help.

Help requested: please wait a moment…

Here is what I found for you :brain: Discord

Hello sjkl,

It appears that the issue you’re experiencing with the animation in the .glb file not playing may be due to the limitations of the Needle Engine’s Exporter. According to the documentation:

The Exporter can translate Unity components like Animator and Timeline into a web-ready format (see the documentation).

Nevertheless, there is a specific mention that:

Only the first clip is exported when using the Animation component (see the documentation).

This could be the reason why the animation embedded in the .glb file is failing to play since only the first clip may be getting exported. To resolve this, you could try the following steps:

  1. Check that your .glb file references the correct animation clip if multiple clips are present.
  2. If there are multiple clips, ensure that the first clip is the one you want to play. If not, rearrange them so the desired clip is first.
  3. If your animations are complex and require multiple animations or transitions, consider using an Animator with an AnimatorController which supports exporting animations with a state machine, conditions, and transitions.

If the problem persists, please provide more specific error messages or symptoms for further assistance.

1 messages left GPT 4

A reasonable check, but I can confirm that the .glb file I’m using only has one animation in it. I’m also not using the Animator component, just Unity Timeline… but I could try adding the file to an AnimatorController…

by user 248501710404845568

aha! I think I might’ve answered my own question. I just realized the animations were all actually exported without any keyframes, likely due to a bug that this Discord’s already solved. I’ll try a GLB animation with something in it…

by user 248501710404845568

yes, that explained it! assuming I should leave this for posterity, but let me know if I should delete it to clean things up!

The Needle Engine must’ve (wisely) not included the animation with no keyframes - and the only actionable followup here might be to try and improve the error messages. But I’m all set for now!

by user 248501710404845568

Hey, glad you figured it out. You’re right the error message could be improved in this case - in Unity you didnt see any error? I’m not sure if the runtime can really know the reason (the runtime the error could perhaps be tidied up and make suggestions on what could be the reason)

Agree, we probably should log if an animation can’t be exported because it’s empty. Not sure if it would be better to export it as empty animation (and if that’s allowed in glTF)

I think we do log warnings / messages but i didnt check again