Photo Editing / Manipulating in Unity

Hi,
I would like to create a game that let user take photo from webcam / mobile camera then do some cropping and draw some overlay images on top of the cropped photo.
Is there a way to do it in Unity?
Are there some packages on the Asset Store that can help me do it?

You can definitely do this, as I do quite a bit of image transforms in one of my own Asset Store products (unfortunately that won’t help with what you’re attempting to do though).

You would have to do this manually through pixel manipulation, for example see:

I Wouldn’t go for pixel editing, that’s destructive, and makes doing things like moving overlays around extremely intensive.
Just have the source photo on one plane, then layer others on top of it.
So… “Is there a way to do it in Unity?” - Yes, easily.

The OP specifically mentions cropping, which is, by it’s very nature, destructive.

Yeah but you can achieve the same by just modifying the UVs on the plane that the texture is displayed on, preserving the source image.

Thanks for the hints, guys.
@hpjohn : how can I save the final, combined image then?

You could

Or
Unity - Scripting API: Texture2D.ReadPixels for a smaller area of the screen.
For images that are larger than the displayed work area, you could use CaptureScreenshot with a calculated superSize factor, alternatively come up with some way of GetPixel-ing each layer in the same position, and then composite the values yourself

1 Like

Many thanks for the information. I’ll try implementing it

Thank you for the provided information, really useful one, I will try to implement it in my own project