"Optimize Game Objects" not behaving as expected

Hello,

We're currently optimizing our game and noticed that CPU usage is very high for our characters due to the complexity of the hierarchy of the rig. I've been looking into the "Optimize Game Objects" flag to simplify the hierarchy, but I can't seem to get it to work properly.

When I turn on the flag the character model completely disappears. The reason this happens is because we remove the Animator component on the imported model because we want it to be placed somewhere else with an Avatar assigned. The moment the Animator component is removed though, the model disappears along with it. Oddly enough, if you keep the Animator component but instead only disable it, the model is still visible, however if I try to put the Animator anywhere else with an assigned Avatar, it simply does not work. Is that correct behaviour?

I have attached an image to show how it's set up. The Skeleton_ModelVariant is the model with the Animator removed, which is instead placed on the root GameObject. You can see in the scene view that the model is completely missing (there's only text and some colliders visible). We could get around this by just using the Animator that is automatically generated when importing the FBX file, but it would mean changing code in a bunch of places that assume the Animator is on the root.

7015621--830167--optimize_issue.PNG

I'm currently using 2019.4.17 LTS. Any help with this is much appreciated!

Kenny

1 Like

Did this get resolved?

As of 2019.4.25, it still happens.

This flag has an even uglier issue that makes it obsolete in certain use-cases.
See the issue described here:
https://fogbugz.unity3d.com/default.asp?1386353_1unf41gblo5threq

In short, you can't use "Optimize Game Objects" with models for which you want to use Unity's "Animation Rigging" package. (for example to apply a "Look At" constraint on the head of the model)
No valid response yet from QA.

1 Like