0 votes

Hi!
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?
Thanks!

in Engine by (23 points)

1 Answer

0 votes
Best answer

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.

by (381 points)
selected by

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

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

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

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 Frequently asked questions and 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 [email protected] with your username.