I have a SpriteAtlas image that contains textures for a 3D MeshInstance cube model measuring 18 pixels high and 18 pixels wide (the original size of TextureAtlas is 54 pixels wide and 100 pixels high). I would like to crop these images from the original TextureAtlas and save the modified images to an array so that in the future I can dynamically change the texture for the 3D cube model directly in the script. How i can make it?
You can use the “Image”-class. get_region gives you part of the image: