So to simplify things lets just say I have a cannon object that does a 360 when it shoots and a cannonball object that flies out. I need to export this file as an fbx so what I need is one animation since it will be controlled via a script. I have learned to make animations for fbx files using something called the action editor in Blender. I name the animation there, click the F which I believe stands for fake user, and export it to Unity without a problem. The problem is that those have always been rigged characters that have every part connected. Now I have been trying to do this with separate objects but when I try to use one animation they get all screwed up. I have also tried parenting the objects to each other without changing the transform.
Okay so after much trial and error, it seems that the only possible way to do this is with an armature. Just rig the armature to all the objects you want to animate and create one action animation in the armature. I have 4 bones in the armature, none of which are actually connected with each other (both the bones and the objects) and I just animate the bones. ! animation to export to Unity with many different moving parts.