Hi, currently i need to use glb model in my project. Is there any other way to use glb model instead of fbx?
Not in the Editor, but from script you can load and use glb files at runtime.
how about animation in glb, is it able to use same method?
It should work just fine … but will likely need to be set up from script, see the animation examples here - they load glb and set up anim component:
@Elliott - is there some good way to set up anim component in the Editor, and attach it to runtime loaded GLB? Maybe save it on a template, and then add loaded glb as a rootBone?
The animations will need to be loaded in the same way as the model so they’ll need to be assigned in the script too. You can create an anim state graph asset in the editor then load this asset in your script and assign it to your entity’s anim component. After which you can assign the loaded glb animations to the corresponding states in the graph.
Pretty similar to the approach taken in the locomotion example @mvaligursky linked.
Can you not simply setup an entity with anim component in the Editor, and also link animations in the component, and have it either part of the scene, or stored as a template? Then simply add glb mesh to it … but not having to manually load animations?
If the animations are imported as .glb files I’m assuming they’ll be the binary type in the editor. Those can’t be added to the anim component.
I do this in the Bitmoji Library Project where I load the animations and models from GLBs and plug them together.
You should be able to extract the bits you need from this. If not, let us know and I try to find some time to do this.