Change viewport (GDScript) in Godot 3.0

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DimitriyPS
:warning: Old Version Published before Godot 3 was released.

In Godot 2.1 there is a method:

get_viewport().set_rect()

How is it replaced in Godot 3.0?

:bust_in_silhouette: Reply From: Will Nations

I’m not quite sure, but just looking at the latest API, it seems like the only Rect2-referencing function is set_attach_to_screen_rect(Rect2 rect). Does that appear to have the same functionality?