Skip to content

Manual's csharp event handling instructions fixed. The previous versi... #11131

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

atherman2
Copy link

…on didn't work with csharp.

Changes made to csharp section at scene organization at best practices at manual. It concerns csharp event handling instructions. The previous instructions didn't work with csharp.

@Calinou Calinou added bug topic:dotnet area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.4 labels Jul 21, 2025
@skyace65 skyace65 requested a review from a team July 23, 2025 01:11
@raulsntos
Copy link
Member

The previous version of the instructions should work on C# and they match the GDScript instructions, although they may not be the best practice to follow. And keep in mind the names for the signal (SignalName) and method (ObjectWithMethod.MethodOnTheObject) are just placeholders.

It may be a good idea to show how to declare the signal in the child, as you do in your changes. However, this would also apply to the GDScript example. To be honest, I don't think the goal of the example is to show you how to use signals, there's a dedicated C# Signals page that goes more in depth about that.

@paulloz
Copy link
Member

paulloz commented Jul 27, 2025

In addition, it can be confusing to show the delegate definition and the EmitSignal() call in the same scope. We've had similar issues on other pages with readers learning C# not understanding this wouldn't be actual valid code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation bug cherrypick:4.4 topic:dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants