Export the default animation on selected prefab to a video file.
Use FFmpeg to handle video export.
When exporting to .gif format, keep in mind that commonly-used browsers support a frame rate up to 50. .gif files with higher frame rate will not play properly on browser.
Recording in play mode
Adjust main camera to obtain the best recording position and angle. When recording starts, Unity enters play mode.