- Home /
Duplicate Question
Nullreferenceexception and resulting animator not playing correct animation
Hi i added a mesh with animations and in the inspector preview it looks fine but the animator is playing the previous animation before I deleted it.
Its also throwing 3 nullreferenceexceptions....
Okay the references are gone, but its not playing the right animation? I looked at the preview of the transition in the inspector and it looks fine even on the transition but its not working right. I put the code that changes an animator int that triggers this animation in update () and i used getmousebuttondown (1) to trigger it.
however, its playing a completely different animation!
also the int i switch to trigger it is not changing in the animator panel, but no other animation has been programmed by me to trigger on rightclick...
i rclick. nothing changes except it transitions to the wrong animation. i dont even know where it GOT the animation! it looks like an old 1-handed gun ai$$anonymous$$g animation i imported yesterday, but i deleted it. when i saw the connection, i closed unity and reopened it but it didnt do me any good. i also thought it could be how i set the int to 0 after getmousebuttondwn (1) was false, and it was a problem, but it didnt fix it still.
Click the state box and re-drag the animation file in from your model prefab.
Follow this Question
Related Questions
How should I import a snowboard character? 0 Answers
Basics for character modeling and animation 1 Answer
Children won't animate 2 Answers
blender animations problem (or bug) in mecanim 0 Answers
Mecanim changes my animations. 0 Answers