Hi
Recently i’ve been trying to animate my player using the bones system and I’ve got it to a point where I can easily animate the player itself and it is working properly, however, I want to change certain sprites at certain points in an animation (like in idle, at some point the eyes blink) and from my understanding, you need to have a sprite library, skin, resolver etc, and I have all of those with them set up correctly, I think, but when I try to animate the player, by pressing record and then making changes, the sprite does change when I change the label in the inspector, but for some reason in the animation tab it just keeps defaulting back to the original sprite after I click to another key frame and I do not know why. Any help will be appreciated.
Perhaps you have “Write Defaults” checked in the animation state?
NOTE: If you animate what Sprite is shown that will overwrite stuff you do in code, unless you put your overwrite code in LateUpdate(). Here’s why:
Meanwhile, here’s just general animation stuff to note:
Anything with Animations / Animators / Mechanim:
Only consider the code AFTER you have done this critical step:
Always start with the Animator state machine and prove it works in isolation, no code at all.
Here’s more reading:
Nope that still didnt work. Im not trying to use any code to change anything at the moment, its literally just the character and im trying to change the sprite of the head within in animation. Like in the animation window, I have 2 key frames, with one of them being the normal head and one being the blinking head, but whenever I try to change the one frame to have the blinking head, it physically shows the blink in the scene view but then I click off the key frame and it changes back to the normal head.