I am utilizing a really fundamental animation to create a transition, which includes deactivating a gameobject on the final keyframe.
Aim:
- The ChangeRound animation is about 1 second lengthy. It allows the UI picture at the start, and disables it on the finish of the animation.
Downside:
- Animation is taking part in, however the gameobject just isn’t disabled within the final keyframe. Notice that each one my states have "Write Defaults" set to false.
What I’ve achieved to repair it:
- If I transfer the keyframe which disables the gameobject one body earlier than, then the article will get disabled accurately. Notice that within the Animation clip image under, I additionally animate different properties, so shifting the disable-keyframe 1 body earlier than would not shorten the animation (i.e. the image under is a semplification).
Hierarchy:
- The HUDScripter incorporates the Animator element.
- I am simply making an attempt to allow/disable the Erasers gameobject.

Animation:
- Easy animation clip. Works wonderful when previewing it
- Permits the gameobject at the start, then disables it on the finish (once more, truly there are different properties being animated, not simply the disabling of the gameobject, so shifting the disable keyframe one body earlier than would not shorten the animation by 1 body).

I’m fully baffled that this isn’t working. I’ve made loads of fundamental animations earlier than and this looks as if such a simple operate that fully refuses to work. I think about I am lacking one thing very easy however I’ve spent hours on this with no resolution. Any assist can be appreciated.
Really, I would prefer to know if there’s one thing totally different from shifting the disable keyframe 1 body earlier than and likewise if this can be a dependable workaround. I am considering to make use of the StateMachineBehaviour to detect if we’re leaving a state of the animator finite state machine, however utilizing the animation clip to allow / disable gameobjects was so comfy…
What about placing an animation occasion on the final keyframe? However most of all I am taken with why the primary method would not work.
Notice: this query was tailored from right here


