unity3d - Is there any way to capture video or image from Unity (which use Vuforia) iOS application?



I have an Augmented Reality functionality made using Unity + Vuforia plugin which I integrated into the iOS application. The app uses the camera as background and when you navigate camera to some marker 3D object will appear on it.

My task is to add buttons which will start and stop capture video (or image) from the camera. The output should be a video with camera scene + 3D object.

I made some investigation, but the only solution I found is to convert the view of AVCaptureVideoPreviewLayer on which camera preview is showing to a video (or image). But from my opinion, this solution is inefficient and not flexible.

Is there any way to get a current instance of the AVCaptureSession from Unity (or maybe Vuforia plugin)? Or maybe there is another way to solve my problem?

Any pieces of advice or guides will be very helpful.

1 Answer: 

I don't think you should use AVCaptureSession to get the preview and even do the capture operation in Cocoa-Touch instead you should capture the image in Unity and pass the data to Cocoa-Touch native API.

Here is the link how to capture the screenshot in Unity.