Blender mesh deform during animation

I’ve been trying out 3d animating recently, and wanted to export an idle animation to unity, but when the animation played the leg bone deformed and I can’t figure out what’s wrong.
the ones above are during the animation.154638-deformed.png
154636-normal.png

I dont know wether I just did something extremely wrong, or its just Unity with it’s many quirks, but what I do know is that legs aren’t supposed to look like that.

(black is shadow cuz I was too lazy to do good lighting for my animating scene)

It sometimes helps in such cases to use another Bone-Value in the Quality parameter of the SkinnedMeshRenderer

And you should also ensure that your whole model is correctly weight-painted.