This is a paid asset, but now you can download Ghost Recording and Replay Script Free.
Detail this asset from Unity Store: Original Link
Ghost Recording and Replay Script v1.1 (Latest version)
“If possible, please buy the package to support the developer”
Record your gameplay and play back the recording of the character, car, player etc. Just feed in your gameObject and use the recording functions to start, stop or play the ghost as it was recorded.
Also includes the ability to store the ghost as a file on the users machine to be retrieved later. Great for saving highscores.
Happy to be contacted if there are any integration issues.