class_visualscriptreturn.rst 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 VisualScriptReturn.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualScriptReturn:
  6. VisualScriptReturn
  7. ==================
  8. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Exits a function and returns an optional value.
  13. Properties
  14. ----------
  15. +-----------------------------------------------------+-------------------------------------------------------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`return_enabled<class_VisualScriptReturn_property_return_enabled>` |
  17. +-----------------------------------------------------+-------------------------------------------------------------------------+
  18. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`return_type<class_VisualScriptReturn_property_return_type>` |
  19. +-----------------------------------------------------+-------------------------------------------------------------------------+
  20. Description
  21. -----------
  22. Ends the execution of a function and returns control to the calling function. Optionally, it can return a :ref:`Variant<class_Variant>` value.
  23. **Input Ports:**
  24. - Sequence
  25. - Data (variant): ``result`` (optional)
  26. **Output Ports:**
  27. none
  28. Property Descriptions
  29. ---------------------
  30. .. _class_VisualScriptReturn_property_return_enabled:
  31. - :ref:`bool<class_bool>` **return_enabled**
  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. | *Setter* | set_return_type(value) |
  43. +----------+------------------------+
  44. | *Getter* | get_return_type() |
  45. +----------+------------------------+
  46. The return value's data type.