Hello everyone! I’ve done 12 hours of research, and I’ve successfully created a UI page where the user can zoom and drag images to be turned into sprites (using a mask, planning to crop out the square part inside the frame (the mask) to be a new sprite, from texture->sprite). However, I’m stuck on the valid way of doing so:
- use some math formula and arrays to create a new texture from scratch, somehow record the zoomed into and offsetted pixel positions and fill up the rest of the texture with white pixels
- use ReadPixels to directly grab off of the box (I couldn’t get it to work, keep getting “why drawing” errors… maybe world coordinates instead of canvas idk?)
- use Render to texture and read off of texture (how would I do that in a practical way with UI)?
I just want to save the square region within the frame… Thank you do much for your time and help!