Hello, everyone! I'd like to assign to a TextureRect node a texture from the script. Is it possible? If yes, how can I do it?
https://docs.godotengine.org/en/stable/classes/class_texturerect.html#class-texturerect-property-texture https://docs.godotengine.org/en/stable/classes/class_imagetexture.html#class-imagetexture https://docs.godotengine.org/en/stable/classes/class_texture.html#class-texture
The second link might actually be the more important one in here. You don't just apply an image as it is on disk to the rect. You first create a texture resource out of it then apply that to the rect.