class_visualscriptreturn.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/modules/visual_script/doc_classes/VisualScriptReturn.xml.
  6. .. _class_VisualScriptReturn:
  7. VisualScriptReturn
  8. ==================
  9. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Exits a function and returns an optional value.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Ends the execution of a function and returns control to the calling function. Optionally, it can return a :ref:`Variant<class_Variant>` value.
  15. \ **Input Ports:**\
  16. - Sequence
  17. - Data (variant): ``result`` (optional)
  18. \ **Output Ports:**\
  19. none
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-----------------------------------------------------+-------------------------------------------------------------------------+-----------+
  26. | :ref:`bool<class_bool>` | :ref:`return_enabled<class_VisualScriptReturn_property_return_enabled>` | ``false`` |
  27. +-----------------------------------------------------+-------------------------------------------------------------------------+-----------+
  28. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`return_type<class_VisualScriptReturn_property_return_type>` | ``0`` |
  29. +-----------------------------------------------------+-------------------------------------------------------------------------+-----------+
  30. .. rst-class:: classref-section-separator
  31. ----
  32. .. rst-class:: classref-descriptions-group
  33. Property Descriptions
  34. ---------------------
  35. .. _class_VisualScriptReturn_property_return_enabled:
  36. .. rst-class:: classref-property
  37. :ref:`bool<class_bool>` **return_enabled** = ``false``
  38. .. rst-class:: classref-property-setget
  39. - void **set_enable_return_value** **(** :ref:`bool<class_bool>` value **)**
  40. - :ref:`bool<class_bool>` **is_return_value_enabled** **(** **)**
  41. If ``true``, the ``return`` input port is available.
  42. .. rst-class:: classref-item-separator
  43. ----
  44. .. _class_VisualScriptReturn_property_return_type:
  45. .. rst-class:: classref-property
  46. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **return_type** = ``0``
  47. .. rst-class:: classref-property-setget
  48. - void **set_return_type** **(** :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` value **)**
  49. - :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_return_type** **(** **)**
  50. The return value's data type.
  51. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  52. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  53. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  54. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`