Texture in TextureRect not loading

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

I’m new to using Godot. I’m creating a Player scene for my game, and I’m using an Area2D as the root node. I added a TextureRect as a child of Area2D, and in the Inspector, I selected Texture → Load, selected my .png file, and pressed Load. But, in the editor, it showed that the texture was empty.
How should I fix this?

:bust_in_silhouette: Reply From: MaaaxiKing

Does it show that the .png file at “Texture” is empty or is it just hidden in in the Scene? Maybe you turned the visibilty off or maybe your TextureRect’s size is (0, 0), then it couldn’t show anything.

It just shows “empty”. The size is (40,40) and visibility is on.

Huckleberry256 | 2020-06-23 21:48

Maybe you did everything right but then you changed the path of the texture, so the current given path can’t load anything?

MaaaxiKing | 2020-06-23 23:32

I got it to work! Turns out that the .png file was in the wrong place.

Huckleberry256 | 2020-06-24 16:29