I’m making a game with a map that only needs part of it shown at any time, so I have code that crops it to return a new Texture2D. This is done in its own static C# class.
I have got this far but actually setting a canvas to have this cropped image is proving impossible for me.
All tutorials show dragging and dropping sprite assets into the image component but none show how to do this in code.