Merge pull request #59724 from timothyqiu/custom-viewport

This commit is contained in:
Rémi Verschelde 2022-03-31 16:17:56 +02:00 committed by GitHub
commit 8f06d8653c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -583,6 +583,10 @@ void Camera2D::set_custom_viewport(Node *p_viewport) {
remove_from_group(canvas_group_name);
}
if (custom_viewport && !ObjectDB::get_instance(custom_viewport_id)) {
viewport = nullptr;
}
custom_viewport = Object::cast_to<Viewport>(p_viewport);
if (custom_viewport) {