I create a simple project and the put one animated (Unity Animation) cube If I disable the Cube the animation is paused in the Animator but If i re-enable the GameObject the animation restart from the beginning.
I want to pause the current animation & hide the gameobject then resume the same animation.
Yes, when you disable an Animation component, it releases its memory. When it gets re-enabled, it restarts everything. You’ll have to save the state on your own and then resume that state right after re-enabling the Animator.
I find this behavior counter-intuitive. If I wanted to release the memory I would delete the game object. How should one disable object temporarily without some hacks?
You could also just disable the mesh renderer component on the cube game object without disabling the entire cube. ( I think). Basically the cube keeps spinning, but is now invisible.