InvalidCastException, cant export and load gltf

Hey folks, are there any limitations when exporting models with their animations/controllers?
Pasting the log from an exception when trying to export:

InvalidCastException: Specified cast is not valid.
Needle.Engine.Gltf.AnimatorControllerHandler.OnAfterNodeExport (Needle.Engine.Gltf.GltfExportContext context, UnityEngine.Transform transform, System.Int32 nodeId) (at Library/PackageCache/com.needle.engine-exporter@2.53.2-pre/Gltf/Editor/AnimatorControllerSerialization.cs:21)

Original Post on Discord

by user 342757359518744576

Would you mind sharing the scene with me via pm and some information about the controller? (The scene can be sent by using Help/Needle Engine/Zip scene)

Im not at the pc anymore today but can try reproducing tomorrow and fix it. Having the scene would help greatly

hey Marcel. Sure thing, sending a .zip your way. Thanks!

by user 342757359518744576

Hello @aleksa.josic so one problem I found is the use of AnimatorOverrideControllers: those are not supported just yet.

oh I see. Thanks! Is there a list of things that are not supported atm? Also, I suggest updating the exception error to reflect the issue.

by user 342757359518744576

Yes sure im working on that right now :slightly_smiling_face:

Awesome, thanks! The tooling of the package is amazing, btw. Such a smooth install->run, haven’t experienced anything like it so far :smile:

by user 342757359518744576

Thanks, thats good to hear!

So when preventing override controllers to export there are tons of errors about clip bindings not being resolved - im not sure if this is just a case of not throwing an error in that case because the animations are playing as far as I can tell and they also contain the correct tracks - but the clips also contain tracks that dont belong to the object the clip is targeting which seems wrong to me. I cant fix that tonight but will take a closer look again this week.

Would be great if you could test the next version and let me know if the animations (besides the errors) play as expected or not :slightly_smiling_face:

The fix is just published

Hm, so I see the update in #:books:-releases , but the scoped registry is not showing an update. I tried modifying the manifest.json manually and it also didn’t find the new version…

When I initially exported the scene, I was only seeing a black screen. You’re saying that you’ve exported it and were able to walk around in first person to inspect animations, without adding extra components?

by user 342757359518744576

Oh let me check looks like the update didnt get through - haven’t done it on this computer before so seems like it failed and i didnt notice…

ok published now - thanks for the headsup

I wasnt able to walk around, some scripts were missing and i had compiler errors so i deleted the scripts to be able to compile and export to just test the animation export - so all I could see were the idle animations when it worked

So couldnt really test more