- Home /
Why does "Optimize Game Objects" break my armature and animations?
In Unity 4.5.0f6, I have imported a character model, armature and animation from Blender. I selected Humanoid rig in the import settings but did NOT enable "Optimize Game Objects". Configure Avatar shows me that the bones are correctly assigned, everything is green, and all is good! So, with an avatar created, an animator assigned, I click on play, and everything works as expected. Then I enable "Optimize Game Objects" and everything goes to hell in a handcart. Animations no longer run and the model is permanently stuck, hovering off the ground and rotated about 90 degrees around the Y and X axes... what's going wrong here?
Have you removed doubles from your mesh and checked for duplicate faces(very hard to spot, though recalculating Normal's can hint at this when it is not working as expected) and any stray(unseen) edges. $$anonymous$$y guess is that if you have any of these then the optimization will remove the mistakes(duplicates) and what you are left with may not be correctly bound to your armatures. It is worth double checking your mesh for these errors, then if you have the same problem you know the cause is something else...
Answer by TirythDM · Oct 20, 2014 at 06:24 PM
Hi, I has this same problem, in my case, I was using the Animator controller on the father of the prefab instead on FBX that I imported... Changing that and putting the animator in FBX and the controller there, its come back to animate o.o I dont really know why, but thats works for me XD I just needed to change my scripts to GetComponentInChildren()
Hope it helps
Unity 2017.3 and still the same problem ,, this answer works btw ,, I tested it before googling ,, but I want another solution ,,, I don't want to alter my scripts and nor unity's standard asset scripts :(
Could you send a screenshot of the Hierarchy you're using, and the one you should use as said on the answer above? I think I'm not understanding it