class_viewporttexture.rst 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ViewportTexture.xml.
  6. .. _class_ViewportTexture:
  7. ViewportTexture
  8. ===============
  9. **Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Texture which displays the content of a :ref:`Viewport<class_Viewport>`.
  11. Description
  12. -----------
  13. Displays the content of a :ref:`Viewport<class_Viewport>` node as a dynamic :ref:`Texture2D<class_Texture2D>`. This can be used to mix controls, 2D, and 3D elements in the same scene.
  14. To create a ViewportTexture in code, use the :ref:`Viewport.get_texture<class_Viewport_method_get_texture>` method on the target viewport.
  15. Tutorials
  16. ---------
  17. - `GUI in 3D Demo <https://godotengine.org/asset-library/asset/127>`__
  18. - `3D in 2D Demo <https://godotengine.org/asset-library/asset/128>`__
  19. - `2D in 3D Demo <https://godotengine.org/asset-library/asset/129>`__
  20. - `3D Viewport Scaling Demo <https://godotengine.org/asset-library/asset/586>`__
  21. Properties
  22. ----------
  23. +---------------------------------+--------------------------------------------------------------------+------------------+
  24. | :ref:`NodePath<class_NodePath>` | :ref:`viewport_path<class_ViewportTexture_property_viewport_path>` | ``NodePath("")`` |
  25. +---------------------------------+--------------------------------------------------------------------+------------------+
  26. Property Descriptions
  27. ---------------------
  28. .. _class_ViewportTexture_property_viewport_path:
  29. - :ref:`NodePath<class_NodePath>` **viewport_path**
  30. +-----------+-----------------------------------+
  31. | *Default* | ``NodePath("")`` |
  32. +-----------+-----------------------------------+
  33. | *Setter* | set_viewport_path_in_scene(value) |
  34. +-----------+-----------------------------------+
  35. | *Getter* | get_viewport_path_in_scene() |
  36. +-----------+-----------------------------------+
  37. 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.
  38. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  39. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  40. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  41. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  42. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  43. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`