This starts the recording and internally it may call PrepareRecording if its not called earlier to this call. If it calls PrepareRecording internally, it may show up permission for the user to allow recording.
recorder.StartRecording(callback: (success, error) => { if (success) { Debug.Log("Start recording successful."); } else { Debug.Log($"Start recording failed with error [{error}]"); } });
Example
Copyusing VoxelBusters.ScreenRecorderKit; IScreenRecorder recorder; //... Create instance for IScreenRecorder via ScreenRecorderBuilder public void StartRecording() { recorder.StartRecording(StartRecordingComplete); } private void StartRecordingComplete(bool status, Error error) { if (success) { Debug.Log("Start recording successful."); } else { Debug.Log($"Start recording failed with error [{error}]"); } }
using VoxelBusters.ScreenRecorderKit; IScreenRecorder recorder; //... Create instance for IScreenRecorder via ScreenRecorderBuilder public void StartRecording() { recorder.StartRecording(StartRecordingComplete); } private void StartRecordingComplete(bool status, Error error) { if (success) { Debug.Log("Start recording successful."); } else { Debug.Log($"Start recording failed with error [{error}]"); } }
Last updated 1 month ago
Was this helpful?