Skip to content

ProjectSettings.load_resource_pack replaces res:// completely #48563

Closed
@mrimvo

Description

@mrimvo

Godot version:
3.3 stable

OS/device including version:
Ubuntu 18.04

Issue description:
I tried to load a resource pack:

ProjectSettings.load_resource_pack("res://resource_pack.pck")

as described in the documentation

After loading the resource pack, it is not possible to access the resources of the original game. It looks like the loaded resource pack replaces res:// completely.

Steps to reproduce:

  1. import my minimal reproduction project into Godot 3.3
  2. hit F5 to run it
  3. the console will show the contents of res://

Expected:

  • Main.tscn should still be listed as part of res:// even after using load_resource_pack

Observed:

  • Main.tscn is missing in res://

Minimal reproduction project:

load_resource_pack.zip

This is the Main.gd script of the minimal project:

func _ready():
	# zip or pck doesn't matter, produces the same result
	ProjectSettings.load_resource_pack("res://resource_pack.pck")
	
	# check res:// content
	var dir = Directory.new()
	dir.open("res://")
	dir.list_dir_begin(true, true)
	while true:
		var file = dir.get_next()
		if not file:
			break
		print(file)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions