Topic was automatically imported from the old Question2Answer platform.
Asked By
GuilhermeA
Hello, how do I say to set the texture of my Sprite node by the image path? Can I also use external images that are saved locally, using their absolute path?
var spath
var sprite_texture = preload (spath)
$Sprite.texture = sprite_texture
And by just changing spath you can now edit in your script, as for external files you can try using a file dialogue node to load images in game which I’m still battling with so can’t help much in that department.
Cheers!!
I also wanted to be able to upload external files that are outside the res folder, when you can comment on this topic?
GuilhermeA | 2020-09-25 19:10
Well you can use the file dialog node which I don’t know much about but it should come in handy