Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug "Optimize Game Objects" not behaving as expected

Discussion in 'Animation' started by CDGKen, Apr 7, 2021.

  1. CDGKen

    CDGKen

    Joined:
    Jun 28, 2019
    Posts:
    29
    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.

    optimize_issue.PNG

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

    Kenny
     
    Last edited: Apr 7, 2021
unityunity