From 98ffb6b37e5f02a1b1e52aaa63ad615c06da541f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 27 Jan 2019 18:18:12 -0300 Subject: Instantiate global classes properly, fixes #20857 --- editor/editor_properties.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index f19eac6878..56bab440c9 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2187,7 +2187,19 @@ void EditorPropertyResource::_menu_option(int p_which) { return; } - Object *obj = ClassDB::instance(intype); + Object *obj = NULL; + + if (ScriptServer::is_global_class(intype)) { + obj = ClassDB::instance(ScriptServer::get_global_class_base(intype)); + if (obj) { + Ref