diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-10-24 18:01:23 -0400 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-10-24 18:01:23 -0400 |
commit | 3679f5971aa431d37cc2acd5d459ed4b38aad26f (patch) | |
tree | cee32a21c68b1d737fc0cbe52b2a0ff649016123 /editor/editor_data.cpp | |
parent | a22fcac9dc8ecca406a3267849954a5a5373dd11 (diff) | |
parent | 1015a481ff43edb1126ab39a147fefda290131e5 (diff) | |
download | redot-engine-3679f5971aa431d37cc2acd5d459ed4b38aad26f.tar.gz |
Merge commit godotengine/godot@1015a481ff43edb1126ab39a147fefda290131e5
Diffstat (limited to 'editor/editor_data.cpp')
-rw-r--r-- | editor/editor_data.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index f4d044f2fd..542db48f79 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -549,6 +549,7 @@ Variant EditorData::instantiate_custom_type(const String &p_type, const String & if (n) { n->set_name(p_type); } + n->set_meta(SceneStringName(_custom_type_script), script); ((Object *)ob)->set_script(script); return ob; } @@ -1010,6 +1011,7 @@ Variant EditorData::script_class_instance(const String &p_class) { // Store in a variant to initialize the refcount if needed. Variant obj = ClassDB::instantiate(script->get_instance_base_type()); if (obj) { + Object::cast_to<Object>(obj)->set_meta(SceneStringName(_custom_type_script), script); obj.operator Object *()->set_script(script); } return obj; |