0 votes

I want to change the Image on a TextureRect, change the size (or scale) of it and center it, I've been trying with:

$TR.texture = texture2
$TR.set_size(Vector2(600,600))
$TR.set_anchors_and_margins_preset(PRESET_CENTER)

and the event

func _input_event():

but I don't get how to use them correctly. Sometimes I get the new size but the image doesn't change when I put $TR.texture = texture2 inside of the event function

asked Jun 10 in Engine by marcos2307 (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.