How can I get texture size? [SOLVED]

When I create new node in editor an apply to it some texture it’s resizing automatically. Like in this example:
example

But when I create new node in script and apply texture, it is not resizing.

Check:

gui.set_size_mode(node, gui.SIZE_MODE_AUTO)
3 Likes