Like oenvoyage (in the comments) I'm not sure a curve modifier is what you're talking about either. For a "simple" "mine cart" animation on a curve I would think you would use something like a "Follow Path" constraint.
If you are using an actual curve modifier my solution here will probably not work.
But if it's simple object animation created using a constraint like I theorized you might use, or parenting or any other similar methods of animating that is not just simple keyframe animation you can always bake the action to keyframes so it should always export no matter what the destination program's compatibility or incompatibility with constraints.
With the object selected go to "Object/Animation/Bake Action"
In the new menu you will probably at least want to select "Visual Keying" which will make it bake (AKA turn into regular keyframes) all animation, like constraints and parenting. If you have constraints or a parent animating the object you can check the options to "Clear constraints" and "Clear parents," or just remove the parenting/constraints yourself when you're done. You also want to make sure the frame range selected encompasses your entire animation length.
This will take most any animation or movement and convert it into keyframes on the location/rotation/scale of the base object, so it should be reasonably simple to export it to any other application like Unity. However, you will lose all the control and ability to adjust the animation that non-destructive constraints and parenting offer you.