Skip to content

Commit b8a980f

Browse files
authored
Merge pull request godotengine#8538 from paulloz/signal-disconnect
Change the note about disconnecting C# signals
2 parents b902842 + eb13caf commit b8a980f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tutorials/scripting/c_sharp/c_sharp_signals.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ In addition, you can always access signal names associated with a node type thro
2727
2828
await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame);
2929
30-
.. note::
30+
.. warning::
3131

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

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

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

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

9595
.. code-block:: csharp

0 commit comments

Comments
 (0)