I have used rigify for rig my character and make some animations to use in my games. But in unity they looks so weird. Searched questions about this issue, and I have tried some solutions like change export settings, bake actions, roll bones in edit bone etc. nothing solved my problem. Thanks for any help.
You have probably "scaled" some of the bones. This happens when you use the squash/stretch features of the Rigify rig. Scaling often cannot be correctly baked and exported to other applications.
One solution is to remove squash/stretch from your animation. Just make sure that the bones are never over-extended during the motion. For legs/arms there is also a Rigify slider that turns stretching off. But the spine for example is "stretchy" by default and you have to be careful not to stretch or squash it.
So my suggestion is to remove all stretching from your animations and test again. If things look good in Unity, then it was indeed the stretching that caused the problem.
If you want squash/stretch there are a few ways to achieve it. I explain why the problem happens in the first place and show a few solutions in this video. (1 hour long but it may be worth it if you're new to working with Game engines) https://www.youtube.com/watch?v=1Xm1h700uhk