Skip to content

Update C# HelloWorld code block #10769

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

Closed
wants to merge 2 commits into from
Closed

Conversation

bk0704
Copy link

@bk0704 bk0704 commented Mar 15, 2025

The original code block was in a "public 2DScript()" method with no return type(or void) what so ever. I edited the C# version to be in a initializer/constructor, just like how the GDScript version is like

The original code block was in a "public 2DScript()" method with no return type(or void) what so ever. I edited the C# version to be in a initializer/constructor, just like how the GDScript version is like
@AThousandShips AThousandShips changed the title Updated C# HelloWorld code block Update C# HelloWorld code block Mar 15, 2025
@skyace65 skyace65 added enhancement topic:dotnet area:getting started Issues and PRs related to the Getting Started section of the documentation labels Mar 15, 2025
@AThousandShips AThousandShips requested a review from a team March 15, 2025 20:14
@raulsntos
Copy link
Member

The public MySprite2D() method is the constructor of the class, that's why it doesn't have a return type. The C# class constructor is the equivalent to GDScript's _init(), changing it for _Ready() is not correct.

@skyace65
Copy link
Contributor

Closing per raulsntos' comment

@skyace65 skyace65 closed this Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:getting started Issues and PRs related to the Getting Started section of the documentation enhancement topic:dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants