Skip to content

Allow using ProjectSettings.load_resource_pack() into a subfolder #7769

Open
@nonchip

Description

@nonchip

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" to res://

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 the String 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions