I have an fbx file that has an animation. I have downloaded the json animation file after PlayCanvas extracted it from the fbx. I edited a number and uploaded the file to my project. What I got was a json file which can’t be used as an animation.
Is there a proper way to upload such file? Animation parser through the codemaybe? Or is it not possible to do any tweaks to the animation json file?
Actually, I’ve just realized you could just change the resource type at runtime, reload it and the parser converts it to an animation XD
If anyone reading this in the future, all you have to do is:
pc.app.assets.get(33755555).type="animation";
pc.app.assets.get(33755555).reload();
//now that resource can be used as animation
yourEntity.animation.animations["newAnim"] = yourReloadedAsset;
yourEntity.animation.play("newAnim");