Can Record (Service Availability)
Check Service Availability
Check if Screen Recorder Kit features can be used. As the functionality needs required support from the hardware, it's always good to check this before calling any of the other plugin methods.
// Create a gif or video recorder instance
IScreenRecorder recorder = ScreenRecorderBuilder.CreateGifRecorder().Build;
bool canRecord = recorder.CanRecord();
Example
public bool CanRecord()
{
IScreenRecorder recorder = ScreenRecorderBuilder.CreateGifRecorder().Build();
//or
//IScreenRecorder recorder = ScreenRecorderBuilder.CreateVideoRecorder(new VideoRecorderRuntimeSettings()).Build();
bool canRecord = recorder.CanRecord();
string message = canRecord ? "Screen Recorder Kit recording API is available!" : "Screen Recorder Kit recording API is not available.";
Debug.Log(message);
return canRecord;
}
Last updated
Was this helpful?