GUI Texture from Script problem [SOLVED]

Hi!

I have a GUI box-node with a texture and I want to change that texture from script.
However when I use “gui.set_texture” I get “Texture x is not specified in scene”.

It’s strange because even when I try to give the node a texture I already set in the editor it says “Texture is not specified in scene”. So in the editor it works fine, but when I try to set the exact same texture from script it doesn’t work.

I have added the atlas with the texture in the “Textures” folder in the GUI-editor.

What am I missing?

Nvm, I found the solution here Changing to another image in atlas for GUI node

Apparently set_texture is for setting the atlas and then you have to use play_flipbook on your desired texture.

1 Like