Thanks for sharing this!
The unzipping works very well.
However, the following line causes trouble:
ProjectSettings.load_resource_pack(zip_file)
Because later on in the game, I need to list all items of a directory, using the following.
func ListItemsInDirectory(path):
var items = []
var dir = Directory.new()
dir.open(path)
dir.list_dir_begin(true, false)
while true:
var file = dir.get_next()
if file == "":
break
items.append(file)
dir.list_dir_end()
return items
But every time get_next() is used, it returns a file name that was inside zip_file, and then the next in that zip_file etc.
Also, things like this don't work anymore:
Directory.remove("path/to/file")
How can I get Godot to stop looking at that zip_file?