How Load png in user

After toying around with this, I can’t seem to load() a texture from “user://” at all - maybe due to how Godot handles resources differently? If that’s the case, some sort of warning or error would be helpful - it always seems to return <Object#null> for me? Maybe something worth submitting to the github project?

I was able to grab a texture from the user folder like this though:

var image = Image.load_from_file("user://myfile.png")
var texture = ImageTexture.create_from_image(image)
$Sprite2D.texture = texture

See if that works?

Also, double-check if your images are truly in the user folder with this:
print(ProjectSettings.globalize_path(path_of_your_image))

1 Like