I am utilizing a really primary animation to create a transition, which entails deactivating a gameobject on the final keyframe.
Purpose:
- The ChangeRound animation is about 1 second lengthy. It allows the UI picture originally, and disables it on the finish of the animation.
Downside:
- Animation is taking part in, however the gameobject isn’t disabled within the final keyframe. Be aware that every one my states have “Write Defaults” set to false.
What I’ve completed to repair it:
- If I transfer the keyframe which disables the gameobject one body earlier than, then the item will get disabled accurately. Be aware that within the Animation clip image beneath, I additionally animate different properties, so shifting the disable-keyframe 1 body earlier than does not shorten the animation (i.e. the image beneath is a semplification).
Hierarchy:
- The HUDScripter incorporates the Animator element.
- I am simply attempting to allow/disable the Erasers gameobject.
Animation:
- Easy animation clip. Works nice when previewing it
- Allows the gameobject originally, then disables it on the finish (once more, really there are different properties being animated, not simply the disabling of the gameobject, so shifting the disable keyframe one body earlier than does not shorten the animation by 1 body).

I’m fully baffled that this isn’t working. I’ve made loads of primary animations earlier than and this looks like such an easy 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 wish to know if there’s one thing completely different from shifting the disable keyframe 1 body earlier than and in addition if it is a dependable workaround. I am pondering 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 concerned with why the primary strategy does not work.
Be aware: this query was tailored from right here
