load custom artwork
This commit is contained in:
parent
8cc55513b7
commit
5e1e27b2cb
10 changed files with 225 additions and 47 deletions
9
src/Utils.gd
Normal file
9
src/Utils.gd
Normal file
|
@ -0,0 +1,9 @@
|
|||
static func load_texture_from_path(path: String) -> Texture:
|
||||
var img = Image.new()
|
||||
var texture = ImageTexture.new()
|
||||
if img.load(path) != OK:
|
||||
print_debug("Cannot load image at path: ", path)
|
||||
return null
|
||||
texture.create_from_image(img)
|
||||
return texture
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue