1

An animated figure requires an Animator to have it show animation. I am trying to create a batalion of soldiers walking in lockstep. Just creating 200 soldiers and moving them is easy, but each one has its own animator and is calculating the animation pose of the soldier in each frame - for each soldier.

But if they are all the same it would seem better to have one animator calculate the pose and use this shaped mesh for all of them.

Is there a way to have several gameobjects share one Animator, one Mesh, and one single copy of the resulting pose?

The screenshot attached shows that the 500 animators consume several milliseconds on 5 CPUs to do the animations...

Image showing Unity profiler

Blindleistung
  • 672
  • 8
  • 21
  • 2
    I haven't tried it myself, but Unity has posted about animation instancing before and I suggest you try it out https://blogs.unity3d.com/2018/04/16/animation-instancing-instancing-for-skinnedmeshrenderer/ – Ron Apr 18 '20 at 11:08
  • Hi. Thanks for that hint. It looks promising, but is in a somewhat broken state. The example scenes included do not work, several issues on github on it. But maybe I can fiddle out how to use the scripts in it. But I see from this that Unity by itself does not provide a builtin solution for this. – Blindleistung Apr 18 '20 at 14:04

0 Answers0