1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- :github_url: hide
- .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the ViewportTexture.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_ViewportTexture:
- ViewportTexture
- ===============
- **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- Texture which displays the content of a :ref:`Viewport<class_Viewport>`.
- Description
- -----------
- Displays the content of a :ref:`Viewport<class_Viewport>` node as a dynamic :ref:`Texture<class_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<class_Viewport_method_get_texture>` method on the target viewport.
- Tutorials
- ---------
- - `GUI in 3D Demo <https://godotengine.org/asset-library/asset/127>`__
- - `3D in 2D Demo <https://godotengine.org/asset-library/asset/128>`__
- - `2D in 3D Demo <https://godotengine.org/asset-library/asset/129>`__
- - `3D Viewport Scaling Demo <https://godotengine.org/asset-library/asset/586>`__
- Properties
- ----------
- +---------------------------------+--------------------------------------------------------------------+------------------------------+
- | :ref:`int<class_int>` | flags | ``0`` *(parent override)* |
- +---------------------------------+--------------------------------------------------------------------+------------------------------+
- | :ref:`bool<class_bool>` | resource_local_to_scene | ``true`` *(parent override)* |
- +---------------------------------+--------------------------------------------------------------------+------------------------------+
- | :ref:`NodePath<class_NodePath>` | :ref:`viewport_path<class_ViewportTexture_property_viewport_path>` | ``NodePath("")`` |
- +---------------------------------+--------------------------------------------------------------------+------------------------------+
- Property Descriptions
- ---------------------
- .. _class_ViewportTexture_property_viewport_path:
- - :ref:`NodePath<class_NodePath>` **viewport_path**
- +-----------+-----------------------------------+
- | *Default* | ``NodePath("")`` |
- +-----------+-----------------------------------+
- | *Setter* | set_viewport_path_in_scene(value) |
- +-----------+-----------------------------------+
- | *Getter* | get_viewport_path_in_scene() |
- +-----------+-----------------------------------+
- The path to the :ref:`Viewport<class_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.)`
|