system
1
|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
ashish |
Hi,
Is there a way to set the size of a TextureRect through code?
Please help.
i guess rect_size
is not working, so i would go with rect_scale
Andrea | 2021-08-25 18:39
system
2
|
|
|
|
Reply From: |
MisterMano |
You should be able to set its size with the function set_size
, like this: $TextureRect.set_size(Vector2(100,50))
Thanks again, MisterMano.
This works.
ashish | 2021-08-26 18:45
Bro how can you do that in godot 4. Is it the same.
idk534475689.aiman | 2023-04-23 18:55