I've got a massive animator controller for my main character in my 2D game. I want to know if my animator controller will load every animation for my main character all at once since all of his animation clips are in the controller. That would represent a huge number of sprites. The game uses sprite animation.

  • \$\begingroup\$ What does your profiler tell you? \$\endgroup\$
    – DMGregory
    Aug 25 '20 at 19:31
  • \$\begingroup\$ I don't have all my animations available to test with. That's why I have to ask. I want to avoid mistakes before I make them. \$\endgroup\$ Aug 25 '20 at 19:45
  • \$\begingroup\$ That's fine. Grab any old image, copy it a dozen times, and do a quick synthetic test. You'll find your answer faster than waiting for a stranger to do this test on your behalf. \$\endgroup\$
    – DMGregory
    Aug 25 '20 at 19:54
  • \$\begingroup\$ The other reason being I figured someone else had probably run into this before and the whole purpose of this service is to spread knowledge and save time. \$\endgroup\$ Aug 25 '20 at 20:22
  • \$\begingroup\$ Heck, maybe someone else will have this question, see the answer here, and save themselves hours of work. It's a good thing. \$\endgroup\$ Aug 25 '20 at 20:23

For posterity, all sprites in all animation clips used in an Animator Controller will be pre-loaded into memory.

In other words, it's not a good idea to have all of your animations for a character handled by one Animator Controller if you have lots of animations for that character.

In my case, (2D point and click adventure game), I'm going to have to either break my controllers apart, or start using the Playables API (probably via some third party library like Animancer).

I wish this were documented somewhere, so here's my wish being granted! Hope this helps someone else.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.