mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 04:33:29 +00:00
Remap script path when registering class.
Was causing `class_name`-defined scripts to not being loaded in exported games due to the remap from `*.gd` to `*.gdc`/`*.gde`.
This commit is contained in:
parent
ec678c5e94
commit
fceb64827e
@ -33,6 +33,7 @@
|
||||
#include "core/core_string_names.h"
|
||||
#include "core/debugger/engine_debugger.h"
|
||||
#include "core/debugger/script_debugger.h"
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/project_settings.h"
|
||||
|
||||
@ -163,7 +164,7 @@ void ScriptServer::init_languages() {
|
||||
|
||||
for (int i = 0; i < script_classes.size(); i++) {
|
||||
Dictionary c = script_classes[i];
|
||||
if (!c.has("class") || !c.has("language") || !c.has("path") || !FileAccess::exists(c["path"]) || !c.has("base")) {
|
||||
if (!c.has("class") || !c.has("language") || !c.has("path") || !FileAccess::exists(ResourceLoader::path_remap(c["path"])) || !c.has("base")) {
|
||||
continue;
|
||||
}
|
||||
add_global_class(c["class"], c["base"], c["language"], c["path"]);
|
||||
|
Loading…
Reference in New Issue
Block a user