You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
fix enum from preloaded script in export
without triggering unnecessary reloads and parsing.
This commit is contained in:
@@ -461,18 +461,21 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
|
|||||||
} else if (!for_completion || FileAccess::exists(path)) {
|
} else if (!for_completion || FileAccess::exists(path)) {
|
||||||
res = ResourceLoader::load(path);
|
res = ResourceLoader::load(path);
|
||||||
}
|
}
|
||||||
if (!res.is_valid()) {
|
|
||||||
_set_error("Can't preload resource at path: " + path);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (!FileAccess::exists(path)) {
|
if (!FileAccess::exists(path)) {
|
||||||
_set_error("Can't preload resource at path: " + path);
|
_set_error("Can't preload resource at path: " + path);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
} else if (ScriptCodeCompletionCache::get_singleton()) {
|
||||||
|
res = ScriptCodeCompletionCache::get_singleton()->get_cached_resource(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!res.is_valid()) {
|
||||||
|
_set_error("Can't preload resource at path: " + path);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (tokenizer->get_token() != GDScriptTokenizer::TK_PARENTHESIS_CLOSE) {
|
if (tokenizer->get_token() != GDScriptTokenizer::TK_PARENTHESIS_CLOSE) {
|
||||||
_set_error("Expected ')' after 'preload' path");
|
_set_error("Expected ')' after 'preload' path");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user