class_viewporttexture.rst 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. Texture which displays the content of a :ref:`Viewport<class_Viewport>`.
  10. Description
  11. -----------
  12. 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.
  13. To create a ViewportTexture in code, use the :ref:`Viewport.get_texture<class_Viewport_method_get_texture>` method on the target viewport.
  14. Properties
  15. ----------
  16. +---------------------------------+--------------------------------------------------------------------+------------------------------+
  17. | :ref:`int<class_int>` | flags | ``0`` *(parent override)* |
  18. +---------------------------------+--------------------------------------------------------------------+------------------------------+
  19. | :ref:`bool<class_bool>` | resource_local_to_scene | ``true`` *(parent override)* |
  20. +---------------------------------+--------------------------------------------------------------------+------------------------------+
  21. | :ref:`NodePath<class_NodePath>` | :ref:`viewport_path<class_ViewportTexture_property_viewport_path>` | ``NodePath("")`` |
  22. +---------------------------------+--------------------------------------------------------------------+------------------------------+
  23. Property Descriptions
  24. ---------------------
  25. .. _class_ViewportTexture_property_viewport_path:
  26. - :ref:`NodePath<class_NodePath>` **viewport_path**
  27. +-----------+-----------------------------------+
  28. | *Default* | ``NodePath("")`` |
  29. +-----------+-----------------------------------+
  30. | *Setter* | set_viewport_path_in_scene(value) |
  31. +-----------+-----------------------------------+
  32. | *Getter* | get_viewport_path_in_scene() |
  33. +-----------+-----------------------------------+
  34. 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.
  35. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  36. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  37. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`