Skip to main content

Usage

The singleton

The recorder runs as a singleton MonoBehaviour that survives scene loads (DontDestroyOnLoad). Properties for binding UI: State, RecordingTime, FrameCount, EncodingProgress, LastOutputPath. Events: OnRecordingStarted, OnRecordingStopped, OnEncodingProgress, OnEncodingComplete, OnEncodingFailed.
Encoding runs on a background thread after StopRecording(). The .gif file exists once OnEncodingComplete fires; watch EncodingProgress for a progress bar.
GifRecorder refuses to start outside Play Mode. The in-memory frame buffer is capped at 512 MB; the recorder caps the duration and logs a warning if your settings would exceed it.

See also