Search Unity

When a animation is loaded to memory?

Discussion in 'Animation' started by EDevJogos, Jan 14, 2018.

  1. EDevJogos

    EDevJogos

    Joined:
    Jul 24, 2014
    Posts:
    75
    In my setup i have a single Animator with all the enemies animations and a single prefab for the enemy, the enemy when Instantiated will pass its id to the Animator making it play that enemy animation.

    wutwut.png
    The problem is that when i looked at the profiler all my enemies where loaded in the memory.

    And then when i was trying to figure out a solution, some weird stuff happend, i removed all my enemies from the project, freeing the memory, and then i put them back in the project, this time i look at the profiler and the memory still free of enemies.

    Then i instantiate the enemy prefab and make it play one of the enemies animation, sure enough it was loaded to memory, but then i stop unity play mode, and play it again, i don't instantiate any enemy this time, but the previous enemy that i had instantiated in the last time is still in the memory u.u.

    And that's why i'm asking, when a animation is loaded to memory?