class_visualscriptreturn.rst 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/visual_script/doc_classes/VisualScriptReturn.xml.
  6. .. _class_VisualScriptReturn:
  7. VisualScriptReturn
  8. ==================
  9. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Exits a function and returns an optional value.
  11. Description
  12. -----------
  13. Ends the execution of a function and returns control to the calling function. Optionally, it can return a :ref:`Variant<class_Variant>` value.
  14. \ **Input Ports:**\
  15. - Sequence
  16. - Data (variant): ``result`` (optional)
  17. \ **Output Ports:**\
  18. none
  19. Properties
  20. ----------
  21. +-----------------------------------------------------+-------------------------------------------------------------------------+-----------+
  22. | :ref:`bool<class_bool>` | :ref:`return_enabled<class_VisualScriptReturn_property_return_enabled>` | ``false`` |
  23. +-----------------------------------------------------+-------------------------------------------------------------------------+-----------+
  24. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`return_type<class_VisualScriptReturn_property_return_type>` | ``0`` |
  25. +-----------------------------------------------------+-------------------------------------------------------------------------+-----------+
  26. Property Descriptions
  27. ---------------------
  28. .. _class_VisualScriptReturn_property_return_enabled:
  29. - :ref:`bool<class_bool>` **return_enabled**
  30. +-----------+--------------------------------+
  31. | *Default* | ``false`` |
  32. +-----------+--------------------------------+
  33. | *Setter* | set_enable_return_value(value) |
  34. +-----------+--------------------------------+
  35. | *Getter* | is_return_value_enabled() |
  36. +-----------+--------------------------------+
  37. If ``true``, the ``return`` input port is available.
  38. ----
  39. .. _class_VisualScriptReturn_property_return_type:
  40. - :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **return_type**
  41. +-----------+------------------------+
  42. | *Default* | ``0`` |
  43. +-----------+------------------------+
  44. | *Setter* | set_return_type(value) |
  45. +-----------+------------------------+
  46. | *Getter* | get_return_type() |
  47. +-----------+------------------------+
  48. The return value's data type.
  49. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  50. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  51. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  52. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  53. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  54. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`