Skip to content

[3.6] Loading a resource pack with load_resource_pack() prevents Directory from seeing the res:// folder when launched from the editor #111433

@rwqfsfasxc100

Description

@rwqfsfasxc100

Tested versions

Reproducible in 3.6.1.stable, 3.6.stable, 3.5.3.stable, 3.5.2.stable, 3.5.1.stable, 3.5.stable, 3.4.5.stable, 3.4.4.stable, 3.4.3.stable, 3.4.2.stable, 3.4.1.stable, 3.4.stable

System information

Windows 11 - Godot 3.6.1.stable - GLES3 - AMD Ryzen 5 7600X processor - AMD Radeon RX 9070 XT graphics

Issue description

When launching from the editor after loading a resource pack through ProjectSettings.load_resource_pack(), and trying to query the res:// folder with Dictionary.dir_exists("res://") returns false, despite it returning true before the load_resource_pack operation. This does not happen when compiling the same code into an executable and running the same code through that application.

Steps to reproduce

  1. Launch via the editor (play)
  2. Query the res:// folder's existence through Directory.dir_exists(). This should return true:
 var dir = Directory.new()
 var does = dir.dir_exists("res://")
  1. Load a resource pack (does not matter if .pck or .zip):
 ProjectSettings.load_resource_pack(C:\path\to\resource\pack.zip)
  1. Retry the same query on res:// as before. This will now return false:
 var dir = Directory.new()
 var does = dir.dir_exists("res://")

Minimal reproduction project (MRP)

load_resource_pack test.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions