-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot load image texture to sprite #23574
Comments
When adding an image to a sprite, you should not add an ImageTexture. To add an image to a sprite, click beside "Texture" in the sprite and select "Load" then, in the inspector, select the image you would like to use. You are having an issue because you are trying to create an ImageTexture and then add an image inside it. However, I can confirm the error messages you receive when you do so. The error messages should be more helpful. |
Ok. Thanks, sorry for the noise. So an imagetexture cannot be used in a sprite or a local image file cannot be used in an imagetexture? |
ImageTexture is more of internal class for converting between Images and Textures. You could use it through GDscript. But there is no reason to use it to assign an Image to a Sprite. |
I'm just wondering if it should not show in the list in sprite when you click on the texture property. Or if load was at the top or said "Load Image" it could be helpful. Just some thoughts. Thanks for the info, should I close this issue or change it to something like "error message unclear when adding imagetexture to sprite"? |
You should choose to You are not the first one to fall in that trap so I believe a choice should be made to make this clear^^ |
Not detectable in current master, closed by bugsquad. |
Godot version:
3.1 alpha 2
OS/device including version:
Ubuntu Linux 16.04 (using i3wm)
Issue description:
when trying to load an image in my resources (icon.png) into a new texture in a sprite the image property remains empty and the following error appears in the output window:
I can load the image into an animated sprite frame but not into a sprite. The error still occurred when I tried GLES2 as well. The expected behavior is that the image loads and shows in the sprite. I can just drag the image from the filesystem, but I'd expect this way to work as well...
This bug happens in a more complex scene as well. I'm really trying to add a sprite as a child note to a rigidbody, but found that it occurs regardless of the parent or siblings.
Steps to reproduce:
Minimal reproduction project:
godot_mwe.zip
The text was updated successfully, but these errors were encountered: