class_viewporttexture.rst 2.4 KB

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