class_visualscriptreturn.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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>` | false |
  17. +-----------------------------------------------------+-------------------------------------------------------------------------+-------+
  18. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`return_type<class_VisualScriptReturn_property_return_type>` | 0 |
  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. | *Default* | false |
  34. +-----------+--------------------------------+
  35. | *Setter* | set_enable_return_value(value) |
  36. +-----------+--------------------------------+
  37. | *Getter* | is_return_value_enabled() |
  38. +-----------+--------------------------------+
  39. If ``true``, the ``return`` input port is available.
  40. .. _class_VisualScriptReturn_property_return_type:
  41. - :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **return_type**
  42. +-----------+------------------------+
  43. | *Default* | 0 |
  44. +-----------+------------------------+
  45. | *Setter* | set_return_type(value) |
  46. +-----------+------------------------+
  47. | *Getter* | get_return_type() |
  48. +-----------+------------------------+
  49. The return value's data type.