Search Unity

Question Is disabling one parent object more performant than disabling multiple child objects?

Discussion in 'Animation' started by AmitChBB, Mar 14, 2021.

  1. AmitChBB

    AmitChBB

    Joined:
    Feb 16, 2021
    Posts:
    37
    I have an animation in which a single frame has a lot of work to do - in it, about 20 gameobjects containing sprites are disabled, and about 10 gameobjects containing sprites are enabled.

    We noticed this specific frame causes minor framerate drops.


    At the moment, each of these sprites is enabled or disabled separately. The timeline is very busy as you can imagine :)



    I was thinking that perhaps putting most of these sprites under a single parent gameobject and disabling it instead would improve the performance of the animation, but I don't actually know if this would have any effect.

    Does anyone know if disabling multiple gameobjects has the same performance as disabling one parent gameobject?