Register Listeners
Get callbacks when an event occurs
Set On Recording Available Listener
This listener is used to get a callback a record gets finished and has a result. In the case of Video recording, this will be file path and for Gif recording the result will be GifTexture instance.
IScreenRecorder recorder;
//... Create video recorder instance via ScreenRecorderBuilder.
//...
recorder.SetOnRecordingAvailable((result) =>
{
string path = result.Data as string;
Debug.Log($"File path: {path}");
});
IScreenRecorder recorder;
//... Create GIF recorder instance via ScreenRecorderBuilder.
//...
recorder.SetOnRecordingAvailable((result) =>
{
GifTexture gifTexture = result.Data as GifTexture;
Debug.Log($"Gif Texture : {gifTexture}");
});
Last updated
Was this helpful?