0 votes

I'm trying to try to get a texture to load from an external folder outside of the project texture = load("C:/Users/all_a/dowloads a texture from external pathoads/texture")
how do this?

Godot version 3.2
in Engine by (185 points)

This proposal might give you some hints on how to do this.

1 Answer

0 votes
var img = Image.new()
var tex = ImageTexture.new()
img.load(path)
tex.create_from_image(img)
$TextureRect.texture=tex

this should work regardless of the path being absolute or inside the project folder

by (1,436 points)
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.
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 webmaster@godotengine.org with your username.