diff --git a/getting_started/scripting/c_sharp/c_sharp_basics.rst b/getting_started/scripting/c_sharp/c_sharp_basics.rst index 9a72a389a..16fd8f970 100644 --- a/getting_started/scripting/c_sharp/c_sharp_basics.rst +++ b/getting_started/scripting/c_sharp/c_sharp_basics.rst @@ -56,15 +56,15 @@ Windows (JetBrains Rider) JetBrains Rider comes with bundled MSBuild, so nothing extra is required. Make sure to set the following preferences: -- In Godot: +- In Godot's Editor Settings: - - Mono External Editor to JetBrains Rider - - Mono Build Tool to JetBrains Mono. + - Set **Mono External Editor** to **JetBrains Rider**. + - set **Mono Build Tool** to **JetBrains Mono**. - In Rider: - - Set ``MSBuild version`` to either bundled with Rider or .NET Core. - - Install **Godot support** plugin. + - Set **MSBuild version** to either **Bundled with Rider** or **.NET Core**. + - Install the **Godot support** plugin. macOS and Linux ~~~~~~~~~~~~~~~ @@ -110,19 +110,23 @@ external editors: - Visual Studio for Mac - JetBrains Rider -.. note:: If you are using Visual Studio Code, ensure you download and install - the `C# extension `_ - to enable features like syntax highlighting and IntelliSense. +.. note:: + If you are using Visual Studio Code, ensure you download and install the + `C# extension `_ + to enable features like syntax highlighting and IntelliSense. -.. note:: If you are using Visual Studio 2019, you must follow the instructions found in the "Configure VS2019 for Debugging" section below. +.. note:: + + If you are using Visual Studio 2019, you must follow the instructions found + in the `:ref:doc_c_sharp_configuring_vs_2019_for_debugging` section below. Creating a C# script -------------------- After you successfully set up C# for Godot, you should see the following option -when selecting ``Attach script`` in the context menu of a node in your scene: +when selecting **Attach Script** in the context menu of a node in your scene: .. image:: img/attachcsharpscript.png @@ -195,6 +199,16 @@ In general, the C# Godot API strives to be as idiomatic as is reasonably possibl For more information, see the :ref:`doc_c_sharp_differences` page. +.. warning:: + + You need to (re)build the project assemblies whenever you want to see new + exported variables or signals in the editor. This build can be manually + triggered by clicking the word **Mono** at the bottom of the editor window + to reveal the Mono panel, then clicking the **Build Project** button. + + You will also need to rebuild the project assemblies to apply changes in + "tool" scripts. + Current gotchas and known issues -------------------------------- @@ -267,6 +281,8 @@ Profiling your C# code - `Mono log profiler `_ is available for Linux and macOS. Due to a Mono change, it does not work on Windows currently. - External Mono profiler like `JetBrains dotTrace `_ can be used as described `here `_. +.. _doc_c_sharp_configuring_vs_2019_for_debugging: + Configuring VS 2019 for debugging --------------------------------- diff --git a/getting_started/scripting/c_sharp/c_sharp_differences.rst b/getting_started/scripting/c_sharp/c_sharp_differences.rst index bef9df062..7aa186162 100644 --- a/getting_started/scripting/c_sharp/c_sharp_differences.rst +++ b/getting_started/scripting/c_sharp/c_sharp_differences.rst @@ -121,7 +121,7 @@ This attribute should be used on a `delegate`, whose name signature will be used [Signal] delegate void MySignal(string willSendsAString); -See also: :ref:`c_sharp_signals` +See also: :ref:`doc_c_sharp_signals`. Singletons ---------- diff --git a/getting_started/scripting/c_sharp/c_sharp_features.rst b/getting_started/scripting/c_sharp/c_sharp_features.rst index 50f9ce86a..adf90a8f0 100644 --- a/getting_started/scripting/c_sharp/c_sharp_features.rst +++ b/getting_started/scripting/c_sharp/c_sharp_features.rst @@ -78,7 +78,7 @@ otherwise it returns true. For more advanced type checking, you can look into `Pattern Matching `_. -.. _c_sharp_signals: +.. _doc_c_sharp_signals: C# signals ----------