I’m overlaying icons on buttons, and currently have them as separate 32x32 textures. Ideally I want to combine them into one texture page, and be able to get the 32x32 rect I want from that texture.
I’m using this texture as an argument in GUI.Button.
This is similar to “UV animated tiles” script, but I don’t have any UVs to offset. Closest thing I can find is GUI Texture and Pixel Inset, but can’t get anything working. I’ve not seen any Texture2D and Rect examples / documentation that help either.
Is there anyway to do something like-
Texture2D newtexture = cliptexture(thebigtexture, rect(0,0,32,32))
Thanks in advance.