You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Merge pull request #91341 from bjornmp/NewMaster
Enforce custom nodes to keep their original type
This commit is contained in:
@@ -4675,6 +4675,11 @@ void EditorNode::stop_child_process(OS::ProcessID p_pid) {
|
||||
Ref<Script> EditorNode::get_object_custom_type_base(const Object *p_object) const {
|
||||
ERR_FAIL_NULL_V(p_object, nullptr);
|
||||
|
||||
const Node *node = Object::cast_to<const Node>(p_object);
|
||||
if (node && node->has_meta(SceneStringName(_custom_type_script))) {
|
||||
return node->get_meta(SceneStringName(_custom_type_script));
|
||||
}
|
||||
|
||||
Ref<Script> scr = p_object->get_script();
|
||||
|
||||
if (scr.is_valid()) {
|
||||
|
||||
Reference in New Issue
Block a user