–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.

asked Jun 16 in Engine by MaaaxiKing (291 points)

1 Answer

0 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

answered Jun 16 by meadcg (44 points)
selected Jun 16 by MaaaxiKing
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.