Save image to Camera roll on iPhone

I want to. take the photo and save it to camera roll on iPhone device. Anyone help me to do this function on PlayCanvas, please. Thank you.

Hi @hoanghiep259 and welcome,

A good starting point is this project, it will generate a screenshot from canvas:

You can then try and downloading the image from the browser, I imagine on iOS that would put the image to the photo gallery:


You can also look to invoke the share feature in the browser


Thank you. I’ve already imported the download function. One more thing, how can I screenshot in AR mode?

Right for that you can use the same pipeline, with a small difference, you will need to paste to the canvas first the camera feed and then the contents of the transparent canvas (PlayCanvas).

I am not aware of an example project about that, I think you can find sample code on how to add multiple things on the download image canvas with an online search.