:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/ViewportTexture.xml. .. _class_ViewportTexture: ViewportTexture =============== **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` Texture which displays the content of a :ref:`Viewport`. Description ----------- Displays the content of a :ref:`Viewport` node as a dynamic :ref:`Texture`. This can be used to mix controls, 2D, and 3D elements in the same scene. To create a ViewportTexture in code, use the :ref:`Viewport.get_texture` method on the target viewport. Tutorials --------- - `GUI in 3D Demo `__ - `3D in 2D Demo `__ - `2D in 3D Demo `__ - `3D Viewport Scaling Demo `__ Properties ---------- +---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+ | :ref:`int` | flags | ``0`` (overrides :ref:`Texture`) | +---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+ | :ref:`bool` | resource_local_to_scene | ``true`` (overrides :ref:`Resource`) | +---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`viewport_path` | ``NodePath("")`` | +---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+ Property Descriptions --------------------- .. _class_ViewportTexture_property_viewport_path: - :ref:`NodePath` **viewport_path** +-----------+-----------------------------------+ | *Default* | ``NodePath("")`` | +-----------+-----------------------------------+ | *Setter* | set_viewport_path_in_scene(value) | +-----------+-----------------------------------+ | *Getter* | get_viewport_path_in_scene() | +-----------+-----------------------------------+ The path to the :ref:`Viewport` node to display. This is relative to the scene root, not to the node which uses the texture. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`