TextureRect
Display images and textures in your UI. Create icons, backgrounds, avatars, and visual elements for game interfaces.
UI
No shortcutBeginner6 min readQuick Reference
TextureRect
Godot EngineKeyboard Shortcut
N/A
Where to Find
Scene dock — Create New Node > Control category
Best Used For
- ▸Build menus, HUDs, and inventory screens
- ▸Create responsive layouts with containers
- ▸Handle button clicks and input field events
Beginner-Friendly⏱ 15–30 minutes to master
Key Settings
Add:Texture:Stretch:Modulate:
TextureRect displays a static texture in your UI. Use it for icons, portraits, backgrounds, and any image elements in your interface.
Where to Find It
Found under Control in Create New Node dialog. Search for "TextureRect".
How to Use
- Add: Add a TextureRect node to your scene.
- Texture: Drag an image to the Texture property in the Inspector.
- Stretch: Choose Scale, Tile, Keep, or Keep Centered mode.
- Modulate: Use Modulate to tint the texture with a color.
Pro Tips
- Use Keep Aspect mode to avoid image distortion.
- Set Expand to true for clickable image areas.