Open Atem1995 opened 2 years ago
ProjectSettings.load_resource_pack("res://mods/cube.pck")
This will not work in an exported project, as that would imply the additional PCK file is exported within your main PCK file.
Loading additional PCKs in HTML5 is possible, but is nontrivial as you need to perform an HTTP request to get the PCK file, then load it using ProjectSettings.load_resource_pack()
.
No,it works on windows exports.But not in HTML5.
---Original--- From: "Hugo @.> Date: Sun, Feb 13, 2022 00:40 AM To: @.>; Cc: "吾也君( Atem @.**@.>; Subject: Re: [godotengine/godot] Exporting packs, patches, and mods did not work on HTML5 exports (Issue #58013)
ProjectSettings.load_resource_pack("res://mods/cube.pck")
This will not work in an exported project, as that would imply the additional PCK file is exported within your main PCK file.
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>
@Atem1995 Please upload a minimal reproduction project to make this easier to troubleshoot.
sure.I will upload it tomorrow morning
---Original--- From: "Hugo @.> Date: Sun, Feb 13, 2022 00:53 AM To: @.>; Cc: "吾也君( Atem @.**@.>; Subject: Re: [godotengine/godot] Exporting packs, patches, and mods did notwork on HTML5 exports (Issue #58013)
@Atem1995 Please upload a minimal reproduction project to make this easier to troubleshoot.
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>
@Calinou I haven't tested the Html5 remote loading PCK yet, but there are a few minor issues with the Windows export, but overall it's not a big deal, but I recommend you take a look at the source code I uploaded and the Markdown documentation. Thank you for making such a great game engine.
Godot version
3.4.2
System information
Window10, GLES3
Issue description
I tried splitting the PCK package to make the FIRST load of the HTML5 game faster, and also to update the content quickly, but I tried to make the HTML5 game load faster first time by splitting the PCK package and also hoping that it would update the content quickly, but the following code doesn't work, I hope to give me a solution, thanks.
print("loading pck!" )
var success = ProjectSettings.load_resource_pack("res://mods/cube.pck") if success: var imported_scene:PackedScene = load("res://Spatial.tscn") self.add_child(imported_scene.instance()) print("load_success")
Steps to reproduce
#
Minimal reproduction project
All the source code was executed in the main scene, but since the export package too big to be uploaded, I uploaded a brief description of the Markdown file.Just check the code.Haha the_func_of_load_resource_pack_Testing.zip #