class_viewporttexture.rst 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ViewportTexture.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ViewportTexture:
  5. ViewportTexture
  6. ===============
  7. **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Texture which displays the content of a :ref:`Viewport<class_Viewport>`.
  12. Properties
  13. ----------
  14. +---------------------------------+--------------------------------------------------------------------+
  15. | :ref:`NodePath<class_NodePath>` | :ref:`viewport_path<class_ViewportTexture_property_viewport_path>` |
  16. +---------------------------------+--------------------------------------------------------------------+
  17. Description
  18. -----------
  19. 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.
  20. To create a ViewportTexture in code, use the :ref:`Viewport.get_texture<class_Viewport_method_get_texture>` method on the target viewport.
  21. Property Descriptions
  22. ---------------------
  23. .. _class_ViewportTexture_property_viewport_path:
  24. - :ref:`NodePath<class_NodePath>` **viewport_path**
  25. +----------+-----------------------------------+
  26. | *Setter* | set_viewport_path_in_scene(value) |
  27. +----------+-----------------------------------+
  28. | *Getter* | get_viewport_path_in_scene() |
  29. +----------+-----------------------------------+
  30. 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.