Because using preloadFile make your browser download ALL your .pck file at the same time, i was looking for another solution.
I've found another solution to download .pck file only when you need it:
func _ready():
var client = HTTPRequest.new()
client.connect('request_completed', self, '_request_completed')
add_child(client)
client.download_file = "res://name of your pck file.pck"
client.request("http://link to your pck file")
func _request_completed(result, response_code, headers, body):
if response_code == 200:
ProjectSettings.load_resource_pack("res://name of your pck file.pck")
get_tree().change_scene("res://name of your scene inside .pck file")
That's awesome but again it's a shame that these informations are not in the documentation