+1 vote

I don't see the differences except that Sprite is a child of Node2D and TextureRect is of Control. The background should be a ParallaxBackground.

in Engine by (378 points)

1 Answer

+2 votes
Best answer

It is stated in the official docs that

TextureRect => "Used to draw icons and sprites in a user interface."
Sprite => "A node that displays a 2D texture."

So I believe it's better to use TextureRect for the user interfaces and Sprite for the background.
The reason probably has something to do with, Sprite being more optimized for in game world use than TextureRect, although they can both deliver the same functionality as background so nothing is stopping you from using them both as such.

Hope this helps

by (48 points)
selected by
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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.