Can't import Blender rig as skeletal mesh

I have a mechanical leg that I’ve rigged (with IK) in Blender that I want to import into UE5 as a skeletal mesh and build a control rig for. I’ve looked at just about every tutorial out there on how to do this, but every time I export my armature + the mesh, it just imports all the parts as separate static meshes, and doesn’t even import the armature at all. I don’t know what I’m doing wrong. Here’s the link to my blender project: test.blend - Google Drive

Hey even though this post is a month old I was just searching for a similar thing - so hope this at least help someone else dealing with the same issue.

I haven’t tried your blend project, but I assume since you say it’s mechanical, that you rigged the mesh by simply parenting it to the bone without any armature deformation.
I was just dealing with the same thing, and could not find any answer for this why it does not work. All the AI tools telling me this should totally work (I guess they are wrong, or there is some option that can fix this not set by default in either Blender or Unreal).

How to fix this: You have to parent your mesh to the bone with Armature Deform - if its hard surface mesh you have to set all Vertices weights to 1. Then it should get Imported to Unreal Engine with Skeletal Mesh.

I have only answer how to fix the issue - but no answer why it does not work by simply parenting it to the bone - if anybody else stumbles upon this post and explain it to me I will be very glad.