extends Reference var filePrexif = "user://colorTiles" # Called when the node enters the scene tree for the first time. func _ready(): pass # Replace with function body. func loadTexture(lat, lon): lat =int(lat) lon = int(lon) var texName = getTexName(lat, lon) print(texName) var image = Image.new() var err = image.load(texName) if err != OK: print("error opening tex ", err) var tex = ImageTexture.new() tex.create_from_image(image, 0) return tex func getTexName(lat, lon): return "%s/m-%s-%s.png" % [filePrexif, lat, lon] # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta): # pass