Character import is messed up. What to Do?

I recently imported a character to unreal (from Blender). I used riggify to create a rig and it looks like this.

But when importing to unreal the skeleton messes up.

It forms a different “Thing” in unreal, (I don’t know what it’s called) for each bone.
I actually don’t even know how to export the character from blender properly.
Someone please help.