Skip to content

Step by step: Using signals shows wrong name for method in C#, adds outside of class #8224

@thettenhausen

Description

@thettenhausen

Godot 4.1.2

In the tutorial for signals the code snippet for C# shows a method being addd called OnButtonPressed, but the engine actually needs a method called on_button_pressed even in C# (and correctly names it). Unfortunately it places it at the end of the file, not inside the class, so it is outside the {}. Was a bit confusing for me since that was when I broke the project for completely unrelated reasons in the filesystem and tried to restore it, but the tutorial send me in the wrong direction. After completely starting this part over from scratch I noticed the discrepancy.

The tutorial should have the correct name in the snippet. If the engine cannot place the code correctly in the wizard maybe add a notice that it needs to be moved before the closing bracket?

Page with issue: https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:getting startedIssues and PRs related to the Getting Started section of the documentationbugtopic:dotnet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions