Merge pull request #3874 from Calinou/doc-csharp-rebuild-solution

Mention the need to rebuild C# solutions for the editor in C# basics
This commit is contained in:
Rémi Verschelde
2020-08-11 13:19:04 +02:00
committed by GitHub
3 changed files with 28 additions and 12 deletions

View File

@@ -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 <https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp>`_
to enable features like syntax highlighting and IntelliSense.
.. note::
If you are using Visual Studio Code, ensure you download and install the
`C# extension <https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp>`_
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 <https://www.mono-project.com/docs/debug+profile/profile/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 <https://www.jetbrains.com/profiler/>`_ can be used as described `here <https://github.com/godotengine/godot/pull/34382>`_.
.. _doc_c_sharp_configuring_vs_2019_for_debugging:
Configuring VS 2019 for debugging
---------------------------------

View File

@@ -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
----------

View File

@@ -78,7 +78,7 @@ otherwise it returns true.
For more advanced type checking, you can look into `Pattern Matching <https://docs.microsoft.com/en-us/dotnet/csharp/pattern-matching>`_.
.. _c_sharp_signals:
.. _doc_c_sharp_signals:
C# signals
----------