Topic was automatically imported from the old Question2Answer platform.
Asked By
TheVorkMan_
I need change texture of my TextureButton.
I asked this question earlier, but i described it wrong.
I don’t need to change his states, only current texture.
So, how to do this?
So, that’d be nearly identical to the answer I provided in your previous question, except you’d want to set the texture_normal property. So, this (for example):
var texture = preload("res://icon.svg")
func _ready():
$TextureButton.texture_normal = texture
Note, the above script is assumed to be attached to the parent node of the TextureButton. If the script is on the TextureButton itself, you’ll need to remove the $TextureButton. part of the code…