Sometimes you need to create a checkpoint system. To do this, the state of non-static and/or moving objects needs to be saved, as some of these might get destroyed later in the game.
One particularly easy way to do this is creating duplicates of those GameObjects that need to be saved and disabling them. Then, when loading the checkpoint, the original objects (if they still exist) are deleted and the duplicates are activated.
However, If a duplicated object had an Animator component, the activated copy is not identical to the original. This may cause some trivial errors such as incorrect model pose, but may be more troublesome e.g. if physics is involved (animated doors that are closed instead of opened etc.).
It would have been really, REALLY awesome if the Animator could simply save its exact state. As others have already stated, this is consistent with other Unity objects
Another hero meet this problem
Found keepAnimatorControllerStateOnDisable only by code completion. Later found it in this thread first question - why this is still not editor property?
Unity animations are really hard to play with: simple task - menu animation grown to some monstruous code-ui-stuff-mix. Thats why:
Conditional transitions from init state is not working (hi to hack with extra state)
States w/o motions are hard (or impossible) to setup as freeze-frame for given offset
Material animations are not supported (yes, they can be shared, yes, it’s possible to write property-setter-wrapper, but…)
Animation state/params are not preserved on enable/disable (w/o help of this thread
Don’t want to mention dev team, but i think it’s time to completely rewrite Unity Animations for actual dev needs and actual Unity state (URP, materials, new ShaderGraph etc)
Kinematica is character animation system w/o state graph (per description, mentioned auto posing and so on). Not sure it’ll be suitable for simple animations like menu transitions.
Anyway i solved my problems with UI with a help of hacks and garbage code Will generalize it after finalizing of UI concept.
Btw, thats why i don’t believe in bolt - it’s easier to write code from start comparing to write workarounds later for system built visually.
What a cringe, i have animator with many states in it, each state bring something new in object state,
so when i set keepAnimatorControllerStateOnDisable and disable object i wanna see same look when i enable it back, but actualy animator applyes default values from animator initialization + values of last state and no care about animator evolution befoure disabling, it’s trash behavior and keepAnimatorControllerStateOnDisable not make what must.