-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using ProjectSettings.load_resource_pack()
into a subfolder
#7769
Comments
ok i appear too dumb to do the "autolink mention" right, so uh, my implementation attempt: godotengine/godot#82035 |
load_resource_pack
into a subfolderload_resource_pack
into a subfolder
load_resource_pack
into a subfolderProjectSettings.load_resource_pack()
into a subfolder
Following up on some discussion in the PR and moving my comment at godotengine/godot#82035 (comment) here: Perhaps instead of mangling I'm not really sure how one would implement this as I have only looked at the engine code a little, but I might take a look into it when I have more time and if someone else doesn't pick up this or the linked PR doesn't get approved. This is a larger proposed change than this original proposal, so if I need to move it to its own proposal I will, but since these are covering the same topic I figured putting it in the existing discussion would be better than having a bunch of issues opened EDIT: I think this may also be useful for the people asking for GDScript sandboxing, as the engine keeping track of whether a script is in a pack could be used to automatically sandbox the script if that were an option to enable. |
Describe the project you are working on
multiple ones, isn't really project-specific but this would allow for anything from sandboxy keeping mods out of "core game files" to just simplifying a lot of tooling that works with packs.
Describe the problem or limitation you are having in your project
ProjectSettings.load_resource_pack
can only "mount" tores://
Describe the feature / enhancement and how it helps to overcome the problem or limitation
add an optional parameter to
ProjectSettings.load_resource_pack
to allow mounting to any path in the virtual file system.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
essentially just need to track a single StringName across
ProjectSettings.load_resource_pack
,PackedData::add_pack
,PackedSourcePCK::try_open_pack
and prepend theString path
built inside that latter function.If this enhancement will not be used often, can it be worked around with a few lines of script?
no, none of the required functionality are exposed to GDScript nor GDExtension
Is there a reason why this should be core and not an add-on in the asset library?
because it would require a (non-compat-breaking) small api change to core functionality.
The text was updated successfully, but these errors were encountered: