-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
In exported games, a FileDialog in Resource mode cannot open resources in subfolders #53339
Comments
I think you misunderstood the API, if you set the https://docs.godotengine.org/en/stable/classes/class_filedialog.html#enum-filedialog-access The documentation is a bit misleading though as it mentions the It could maybe be renamed to |
This does not strike me as a usability problem, or an API documentation issue. The current behavior is that if you have two resources, This really seems like a bug to me, and not a documentation/usability issue. The amount of documentation which would be needed would be absurd and confusing, but I suppose it would be read something like:
|
Additionally, it's possible the title of this bug was misleading. Perhaps a less misleading title would be |
I see. I can't reproduce that bug, I suspect that you don't have any resource in that specific sufolder, so Godot doesn't include it in the resource access. A Here's an updated MRP tested successfully on 3.3.3-stable: Your own project contains another project (+ exported PCK) in the subfolder, that might be the problem? Godot probably doesn't import its files as resources as they belong to another project. |
Did you export the project for Windows, for Linux, or run the project within the Godot editor? I've only verified the bug exists when exporting the project for Windows.
I have duplicated the bug with your updated MRP. After exporting the project for Windows, I cannot open the
The specific files in the subdirectory aren't important, I just wanted files which Godot would export by default. You can see them in the screenshot attached to the issue (https://user-images.githubusercontent.com/5902413/135727463-6318e289-3e10-461d-8857-f7e5fbeddfc8.png). Your example project works fine at duplicating the bug as well. |
I see, I can confirm the bug with an export on Linux too. I had managed to select files in subfolders successfully so I thought it was fine. But indeed I can't open them either. |
Excellent, thanks for confirming. |
This bug is still present as of 4.2 and 4.3 beta 2. I just wasted 2 hours of my life wondering why I couldn't open files in subdirectories. |
Godot version
v3.3.4.stable.official [faf3f88]
System information
Windows 10
Issue description
After exporting a project, opening a FileDialog to select resources only lets you select resources in the root directory. Attempting to select a resource outside the root directory does not close the dialog, and does not emit the
file_selected
signal.If you open a resource in the root directory, the dialog works properly.
If the dialog is set to
File System
instead ofResources
, the dialog works properly.If the game is launched directly from the Godot editor instead of being exported, the dialog works properly.
I am unsure whether this bug only affects Windows exports, or whether it affects other platforms as well.
Steps to reproduce
Reproducing the bug by yourself:
Create a FileDialog. Ensure the
Access
is set toResources
, and that there are resources in a subdirectory which it can access.Export the project for Windows. Open your FileDialog and attempt to access a resource from a subdirectory. Double-click the resource or click the "Open" button to select it. It is expected that the dialog should close and emit the
file_selected
signal. However, the dialog does not respond and no signal is fired.Reproducing the bug with the attached minimal reproduction project:
Export the project for windows. Click the "Open Resource Dialog" button and attempt to access a resource from the "dir" subdirectory. It is expected that the dialog should close and emit the
file_selected
signal. However, the dialog does not respond and no signal is fired.If you close the dialog, you can experiment by accessing files in the root directory, or by launching a FileDialog which access files, instead of resources. Both of these cases will work OK. The FileDialog closes and the file path is printed to the screen.
Minimal reproduction project
Dialogs.zip
The text was updated successfully, but these errors were encountered: