diff --git a/tutorials/scripting/c_sharp/c_sharp_signals.rst b/tutorials/scripting/c_sharp/c_sharp_signals.rst index 8138fe1fa507..737cb32e84ab 100644 --- a/tutorials/scripting/c_sharp/c_sharp_signals.rst +++ b/tutorials/scripting/c_sharp/c_sharp_signals.rst @@ -33,14 +33,164 @@ In addition, you can always access signal names associated with a node type thro await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame); -.. warning:: +Disconnecting automatically when the receiver is freed +------------------------------------------------------ + +Normally, when any ``GodotObject`` is freed (such as any ``Node``), Godot +automatically disconnects all connections associated with that object. This +happens for both signal emitters and signal receivers. + +For example, a node with this code will print "Hello!" when the button is +pressed, then free itself. Freeing the node disconnects the signal, so pressing +the button again doesn't do anything: + +.. code-block:: csharp + + public override void _Ready() + { + Button myButton = GetNode