I’m working on a top down third person shooter game and was trying to add recoil animations that we can easily tweak through code for all of the different guns available. I wanted to do this through Unity’s animation rigging overrides but was running into some limitations.
Firstly, character models have been set up with optimize game objects enabled in the fbx settings due to which animation rigging straight up refuses to work. As far as I’m aware animation rigging does not work when optimizing game objects is enabled as it expects the default bone hierarchy implementation.
I tried to work around this by removing the optimize game objects setting for the character models. This allowed the animation rigging to work but caused the character skins system to break. Basically the current system allows the user to change character skins by replacing the mesh in the skinned mesh renderer. This only works when optimize game objects is enabled for all of the fbx models as it uses the same bone structuring across all fbx files, allowing meshes to be used interchangeably.
Here is the error I get when trying to change the mesh on runtime when optimize game objects is disabled in the fbx settings.
Keeping in mind the limitations I’ve mentioned above, are there any workarounds I can use to get the functionality I desire?