public bool TryStartRecording(out string fileName)
        {
            fileName = string.Empty;
            TextureManager.InitializeVideoRecordingTextures();
            StringBuilder builder           = new StringBuilder(1024);
            string        documentDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
            string        outputDirectory   = $"{documentDirectory}\\HologramCapture";

            if (!Directory.Exists(outputDirectory))
            {
                Directory.CreateDirectory(outputDirectory);
            }

            string desiredFileName = $"{outputDirectory}\\Video.mp4";

            int[] fileNameLength   = new int[1];
            bool  startedRecording = UnityCompositorInterface.StartRecording((int)VideoRecordingLayout, desiredFileName, desiredFileName.Length, builder.Capacity, builder, fileNameLength);

            if (!startedRecording)
            {
                Debug.LogError($"CompositionManager failed to start recording: {desiredFileName}");
                return(false);
            }

            fileName = builder.ToString().Substring(0, fileNameLength[0]);
            DebugLog($"Started recording file: {fileName}");
            return(true);
        }
 public void StartRecording()
 {
     TextureManager.InitializeVideoRecordingTextures();
     UnityCompositorInterface.StartRecording((int)VideoRecordingLayout);
 }
 public void StartRecording()
 {
     UnityCompositorInterface.StartRecording();
 }