diff --git a/hexmapper/scenes/MainMap/map/tile_set_helper.gd b/hexmapper/scenes/MainMap/map/tile_set_helper.gd index a365c9c..cb1ed86 100644 --- a/hexmapper/scenes/MainMap/map/tile_set_helper.gd +++ b/hexmapper/scenes/MainMap/map/tile_set_helper.gd @@ -62,11 +62,10 @@ static func _load_texture_from_path(path: String) -> Texture2D: if path.begins_with("res://"): return load(path) as Texture2D - # For filesystem paths, load the image and create a texture - var image: Image = Image.new() - var error: Error = image.load_from_file(path) - if error != OK: - push_error("TileSetHelper: Failed to load image from file: %s (Error: %d)" % [path, error]) + # For filesystem paths, load the image using static method + var image: Image = Image.load_from_file(path) + if image == null: + push_error("TileSetHelper: Failed to load image from file: %s" % path) return null var texture: ImageTexture = ImageTexture.create_from_image(image) diff --git a/hexmapper/scenes/MainMap/map/tile_set_helper.gd.uid b/hexmapper/scenes/MainMap/map/tile_set_helper.gd.uid new file mode 100644 index 0000000..a5728b3 --- /dev/null +++ b/hexmapper/scenes/MainMap/map/tile_set_helper.gd.uid @@ -0,0 +1 @@ +uid://dy3opdq7yokuc