The In-Game Replay System allow you to record the transform (position, rotation and scale) of any game objects. Then you can easily replay it.
You just need to add the script "ReplayEntity" to the objects you want to replay.
Here's what it does:
The project contains an example scene: