![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | TheVorkMan_ |
Hello everyone!
I want change texture of my TextureButton in GDScript.
How do this?
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | TheVorkMan_ |
Hello everyone!
I want change texture of my TextureButton in GDScript.
How do this?
![]() |
Reply From: | jgodfrey |
If I understand what you’re asking, you just need to assign a new texture to the texture_focused
property of your TextureButton
. So, something like this:
extends Control
var texture = preload("res://icon.svg")
func _ready():
$TextureButton.texture_focused = texture