Should game objects with unchanged transform position but playing 2D sprite animation be "static"?,About setting non-moving game objects to static, does 2D sprite animation count as moving?

Hi, I read that setting non-moving game objects “static” can optimize performance. But I am not sure about if the following cases are counted as “static”:

  1. Objects with unchanged transform position, but with 2D sprite animation played by an animator controller.
  2. Objects with unchanged transform position, but will be switched between active and inactive during game play.
  3. Objects with unchanged transform position, but certain components will be enabled and disabled during game play.
  4. Objects with unchanged transform position, but will be removed during game play.

Thanks for any help

As far as my opinion, the static functions can be set to the objects, which as available in the game/scene, however they do not mean to move/change their transforms, meaning, these objects are precomputed in the engine, which adds huge performance boost.

In your case, as you pointed it out correctly, since you won’t be moving the objects anywhere, it’s a good idea to set them to static.

For example, in one of my projects, I had trees as an objects which needed to animate(Sort of a wind effect), setting all of them to static(also known as static batching, and performing animator on it, did the job, without compromising much on the performance.

In this context, “moving” has nothing to do with “animating”.

Static, dynamic and sleeping are physics (rigidbody) related, which sprite is actually displayed has nothing to do with your rigidbody state. :slight_smile: