class_visualscriptreturn.rst 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.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. Exits a function and returns an optional value.
  10. Description
  11. -----------
  12. Ends the execution of a function and returns control to the calling function. Optionally, it can return a :ref:`Variant<class_Variant>` value.
  13. **Input Ports:**
  14. - Sequence
  15. - Data (variant): ``result`` (optional)
  16. **Output Ports:**
  17. none
  18. Properties
  19. ----------
  20. +-----------------------------------------------------+-------------------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`return_enabled<class_VisualScriptReturn_property_return_enabled>` | ``false`` |
  22. +-----------------------------------------------------+-------------------------------------------------------------------------+-----------+
  23. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`return_type<class_VisualScriptReturn_property_return_type>` | ``0`` |
  24. +-----------------------------------------------------+-------------------------------------------------------------------------+-----------+
  25. Property Descriptions
  26. ---------------------
  27. .. _class_VisualScriptReturn_property_return_enabled:
  28. - :ref:`bool<class_bool>` **return_enabled**
  29. +-----------+--------------------------------+
  30. | *Default* | ``false`` |
  31. +-----------+--------------------------------+
  32. | *Setter* | set_enable_return_value(value) |
  33. +-----------+--------------------------------+
  34. | *Getter* | is_return_value_enabled() |
  35. +-----------+--------------------------------+
  36. If ``true``, the ``return`` input port is available.
  37. ----
  38. .. _class_VisualScriptReturn_property_return_type:
  39. - :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **return_type**
  40. +-----------+------------------------+
  41. | *Default* | ``0`` |
  42. +-----------+------------------------+
  43. | *Setter* | set_return_type(value) |
  44. +-----------+------------------------+
  45. | *Getter* | get_return_type() |
  46. +-----------+------------------------+
  47. The return value's data type.
  48. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  49. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  50. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`