You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS/device including version:
MacBook Air (13-inch, Early 2014) (1,4 GHz Intel Core i5)
MacOS High Sierra 10.13.3
Issue description:
When selecting Project > Export > Export selected resources (and dependencies), .gd scripts selected won't include as dependencies the preloaded resources included in the script.
What it should do
Load the scene correctly because the scene references scriptParent.gd, and this scripts is preloading scriptChild.gd so it should be exported too
What it does instead
The game quits and logcat shows an error similar to this:
ERROR: No loader found for resource: res://scriptChild.gd
Minimal reproduction project:
I can do it if needed.
The text was updated successfully, but these errors were encountered:
I think this is expected because you can't know the script dependencies directly. A TSCN or TRES format explicitly list all of it's dependencies, but script files are just code, so you'd need to parse them in order to detect the dependencies.
The preload function is only a convenience to load the resources when loading the script. Since the script is not loaded when exporting, the editor can't really tell what's needed.
Yes, it is not implemented right now but it would be very useful. Basically, we would need to parse them the exported scripts recursively at compile/build/export time, and determine it's dependencies from the preload function calls.
I understand that the preload function is only for convenience, but we can use it for more useful things.
Godot version:
3.0.2 stable
OS/device including version:
MacBook Air (13-inch, Early 2014) (1,4 GHz Intel Core i5)
MacOS High Sierra 10.13.3
Issue description:
When selecting Project > Export > Export selected resources (and dependencies), .gd scripts selected won't include as dependencies the preloaded resources included in the script.
Steps to reproduce:
What it should do
Load the scene correctly because the scene references scriptParent.gd, and this scripts is preloading scriptChild.gd so it should be exported too
What it does instead
The game quits and logcat shows an error similar to this:
Minimal reproduction project:
I can do it if needed.
The text was updated successfully, but these errors were encountered: