[SOLVED] How to get animations names from an imported GLB

If I put my model into the GLTF Viewer, I can see my animations with the correct names:

But, if I load the same GLB in my project using AssetLoader with “container” as asset type, my animations are there but rename like this “modelName/animation/X”

Is there a way to get the correct animation names like the GLTF viewer?

How are you playing the animation? Via animation component?

The names listed in the screen shot are the generated asset names for the animation assets.

When you have the animation asset, the resource contains the animation track which also contains the track/animation name.


var animationName = containerAsset.resource.animations[0].resource.name;
1 Like

This is exactly what I was looking for! This is perfect.