How to use spritesheets with GUI widgets?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By byjove

Everything is in the title.
I’d like to use spritesheets for my texture buttons but apparently, TextureButton or TextureRect can’t be both used that way. I love to put a certain order to my assets directory, that’s why I would prefer to not using different image files just for texturing several phases of the same button.

Thanks in advance.

:bust_in_silhouette: Reply From: byjove

Nobody? I thout this would be a simple question…

1 Like
:bust_in_silhouette: Reply From: ld2studio

Yes, you can.
For use spritesheets with TextureButton or TextureRect, choose New AtlasTexture and place your spritesheet to atlas property into AtlasTexture resource.
And adjust region to adapt spritesheet to texture node.

Thanks you, it worked!

byjove | 2022-05-10 16:55

1 Like