You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix script class icon filepath lookups at runtime.
This commit is contained in:
@@ -3479,6 +3479,8 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
|
|||||||
tokenizer->advance();
|
tokenizer->advance();
|
||||||
|
|
||||||
if ((tokenizer->get_token() == GDScriptTokenizer::TK_CONSTANT && tokenizer->get_token_constant().get_type() == Variant::STRING)) {
|
if ((tokenizer->get_token() == GDScriptTokenizer::TK_CONSTANT && tokenizer->get_token_constant().get_type() == Variant::STRING)) {
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
if (Engine::get_singleton()->is_editor_hint()) {
|
||||||
Variant constant = tokenizer->get_token_constant();
|
Variant constant = tokenizer->get_token_constant();
|
||||||
String icon_path = constant.operator String();
|
String icon_path = constant.operator String();
|
||||||
|
|
||||||
@@ -3489,6 +3491,8 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
p_class->icon_path = icon_path;
|
p_class->icon_path = icon_path;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
tokenizer->advance();
|
tokenizer->advance();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user