Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the note about disconnecting C# signals #8538

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tutorials/scripting/c_sharp/c_sharp_signals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ In addition, you can always access signal names associated with a node type thro
await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame);
.. note::
.. warning::

Godot will take care of disconnecting all the signals you connected through events when your
nodes are freed. Meaning that: as you don't need to call ``Disconnect`` on all signals you used
``Connect`` on, you don't need to ``-=`` all the signals you used ``+=`` on.
While all engine signals connected as events are automatically disconnected when nodes are freed, custom
signals aren't. Meaning that: you will need to manually disconnect (using ``-=``) all the custom signals you
connected as C# events (using ``+=``).

Custom signals as C# events
---------------------------
Expand Down Expand Up @@ -89,7 +89,7 @@ In contrast with other C# events, you cannot use ``Invoke`` to raise events tied

Signals support arguments of any :ref:`Variant-compatible <doc_c_sharp_variant>` type.

Consequently, any ``Node`` or ``Reference`` will be compatible automatically, but custom data objects will need
Consequently, any ``Node`` or ``RefCounted`` will be compatible automatically, but custom data objects will need
to inherit from ``GodotObject`` or one of its subclasses.

.. code-block:: csharp
Expand Down