Exporting Physics Simulations into Unity

Hello,

I was wondering, is there a way to export physics simulations into Unity? Assume I have an animated flag that I want to use in a game project. Can I turn the simulation into an animation and somehow export it?

Done some Googling, couldn’t really find anything on this. Any help would be appreciated.

Thanks in advance.