Skip to content

Commit c7c16c7

Browse files
authored
Updated C# HelloWorld code block
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
1 parent ff9c75d commit c7c16c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

getting_started/step_by_step/scripting_first_script.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ Add the following code to your script:
148148

149149
.. code-tab:: csharp C#
150150

151-
public MySprite2D()
152-
{
153-
GD.Print("Hello, world!");
154-
}
151+
public override void _Ready()
152+
{
153+
GD.Print("Hello, world!");
154+
}
155155

156156

157157
Let's break it down. The ``func`` keyword defines a new function named

0 commit comments

Comments
 (0)