Viewport
Inherits: Node < ObjectDescription
Abstract base class for viewports. Encapsulates drawing and interaction with a game world. A Viewport creates a different view into the screen, or a sub-view inside another viewport.Properties
bool
default:"false"
If true, the viewport should render its background as transparent.
MSAA
default:"MSAA_DISABLED"
The multisample antialiasing mode for 2D/Canvas rendering.
MSAA
default:"MSAA_DISABLED"
The multisample antialiasing mode for 3D rendering.
Methods
get_camera_2d
get_camera_3d
get_mouse_position
get_texture
set_input_as_handled
Signals
size_changed()
Emitted when the size of the viewport is changed.Example Usage
- GDScript
- C#