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
dedicated server built using MacOS M3 Pro - deployed ARM64
Issue description
I'm trying to load a script on start but it doesn't seem to be available when the app is built as a dedicated server.
Here is the offending line:
var version_file = ResourceLoader.load("res://scripts/version.gd", "", ResourceLoader.CACHE_MODE_IGNORE)
Error:
2024-09-25T19:12:07.983Z
ERROR: Attempt to open script 'res://scripts/version.gd' resulted in error 'File not found'.
2024-09-25T19:12:07.983Z
at: load_source_code (modules/gdscript/gdscript.cpp:1094)
2024-09-25T19:12:07.983Z
ERROR: Failed to load script "res://scripts/version.gd" with error "File not found".
2024-09-25T19:12:07.983Z
at: load (modules/gdscript/gdscript.cpp:2936)
When I change to using load, the error goes away. This isn't a viable workaround for me as I'm loading this file in a pck and need the updated version after loading the pck (i.e. no cache).
load("res://scripts/version.gd")
Steps to reproduce
Load a script file using ResourceLoader.load(<script_file>, "", ResourceLoader.CACHE_MODE_IGNORE)
Note the error doesn't stop the script from load correctly:
With a valid script path:
ERROR: Attempt to open script 'res://test.gd' resulted in error 'File not found'.
at: (modules\gdscript\gdscript.cpp:1033)
ERROR: Failed to load script "res://test.gd" with error "File not found".
at: ResourceFormatLoaderGDScript::load (modules\gdscript\gdscript.cpp:2825)
<GDScript#-9223372013349894945> # Print from the result of ResourceLoader.load()
With a invalid script path:
ERROR: Attempt to open script 'res://tes.gd' resulted in error 'File not found'.
at: (modules\gdscript\gdscript.cpp:1033)
ERROR: Failed loading resource: res://tes.gd. Make sure resources have been imported by opening the project in the editor at least once.
at: (core\io\resource_loader.cpp:278)
ERROR: Error loading resource: 'res://tes.gd'.
at: (core\core_bind.cpp:73)
<Object#null> # Print from the result of ResourceLoader.load()
Tested versions
System information
dedicated server built using MacOS M3 Pro - deployed ARM64
Issue description
I'm trying to load a script on start but it doesn't seem to be available when the app is built as a dedicated server.
Here is the offending line:
Error:
When I change to using
load
, the error goes away. This isn't a viable workaround for me as I'm loading this file in a pck and need the updated version after loading the pck (i.e. no cache).Steps to reproduce
ResourceLoader.load(<script_file>, "", ResourceLoader.CACHE_MODE_IGNORE)
Minimal reproduction project (MRP)
resourceloaderissue.zip
The text was updated successfully, but these errors were encountered: