class_viewporttexture.rst 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/ViewportTexture.xml.
  6. .. _class_ViewportTexture:
  7. ViewportTexture
  8. ===============
  9. **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Texture which displays the content of a :ref:`Viewport<class_Viewport>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. To create a ViewportTexture in code, use the :ref:`Viewport.get_texture<class_Viewport_method_get_texture>` method on the target viewport.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - `GUI in 3D Demo <https://godotengine.org/asset-library/asset/127>`__
  20. - `3D in 2D Demo <https://godotengine.org/asset-library/asset/128>`__
  21. - `2D in 3D Demo <https://godotengine.org/asset-library/asset/129>`__
  22. - `3D Viewport Scaling Demo <https://godotengine.org/asset-library/asset/586>`__
  23. .. rst-class:: classref-reftable-group
  24. Properties
  25. ----------
  26. .. table::
  27. :widths: auto
  28. +---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | flags | ``0`` (overrides :ref:`Texture<class_Texture_property_flags>`) |
  30. +---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | resource_local_to_scene | ``true`` (overrides :ref:`Resource<class_Resource_property_resource_local_to_scene>`) |
  32. +---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+
  33. | :ref:`NodePath<class_NodePath>` | :ref:`viewport_path<class_ViewportTexture_property_viewport_path>` | ``NodePath("")`` |
  34. +---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+
  35. .. rst-class:: classref-section-separator
  36. ----
  37. .. rst-class:: classref-descriptions-group
  38. Property Descriptions
  39. ---------------------
  40. .. _class_ViewportTexture_property_viewport_path:
  41. .. rst-class:: classref-property
  42. :ref:`NodePath<class_NodePath>` **viewport_path** = ``NodePath("")``
  43. .. rst-class:: classref-property-setget
  44. - void **set_viewport_path_in_scene** **(** :ref:`NodePath<class_NodePath>` value **)**
  45. - :ref:`NodePath<class_NodePath>` **get_viewport_path_in_scene** **(** **)**
  46. 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.
  47. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  48. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  49. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  50. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`