From ec10cf9b98921dcecba26f96ed270b306f89fb88 Mon Sep 17 00:00:00 2001 From: Paul Joannon <437025+paulloz@users.noreply.github.com> Date: Tue, 6 Mar 2018 07:55:33 +0100 Subject: [PATCH] Changes on C# introduction page (#1209) * remove signal limitation on C# intro page * add a note about class/script naming on C# intro page --- getting_started/scripting/c_sharp/c_sharp_basics.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/getting_started/scripting/c_sharp/c_sharp_basics.rst b/getting_started/scripting/c_sharp/c_sharp_basics.rst index bf4c34818..d6cfe5032 100644 --- a/getting_started/scripting/c_sharp/c_sharp_basics.rst +++ b/getting_started/scripting/c_sharp/c_sharp_basics.rst @@ -109,6 +109,10 @@ Here's a blank C# script with some comments to demonstrate how it works. As you can see, the things normally in global scope in GDScript like Godot's ``print`` function are available in the ``GD`` namespace. For a list of those, see the class reference pages for :ref:`@GDScript ` and :ref:`@GlobalScope `. +.. note:: + Keep in mind that the class you wish to attach to your node should be named as the ``.cs`` file. + If not, you will get the following error and won't be able to run the scene: ``Cannot find class XXX for script res://XXX.cs``. + General differences between C# and GDScript ------------------------------------------- @@ -125,7 +129,6 @@ As C# support is quite new to Godot, there are some growing pains and things tha Below is a list of the most important issues you should be aware of when diving into C# in Godot, but if in doubt also take a look over the official `issue tracker for Mono issues `_. - As explained above, the C# project isn't always kept in sync automatically when things are deleted, renamed or moved in Godot (`#12917 `_) -- Signals can only be added with ``add_user_signal()`` and don't show up in UI (`#11956 `_) - Debug output like stack traces, file path and line numbers is missing on Windows (`#14589 `_) - Writing editor plugins and tool scripts in C# is not yet supported - Exporting a project may not yet work