Browse Source

Update the state of C#/.NET support as of 4.2

Yuri Sizov 1 year ago
parent
commit
ac728e8dd2

+ 15 - 3
about/list_of_features.rst

@@ -37,6 +37,13 @@ Platforms
 Godot aims to be as platform-independent as possible and can be
 Godot aims to be as platform-independent as possible and can be
 :ref:`ported to new platforms <doc_custom_platform_ports>` with relative ease.
 :ref:`ported to new platforms <doc_custom_platform_ports>` with relative ease.
 
 
+.. note::
+
+    Projects written in C# using Godot 4 currently cannot be exported to iOS
+    and web platforms. To use C# on those platforms, consider Godot 3 instead.
+    Android platform support is available as of Godot 4.2, but is experimental
+    and :ref:`some limitations apply <doc_c_sharp_platforms>`.
+
 Editor
 Editor
 ------
 ------
 
 
@@ -429,12 +436,17 @@ Scripting
 :ref:`C#: <toc-learn-scripting-C#>`
 :ref:`C#: <toc-learn-scripting-C#>`
 
 
 - Packaged in a separate binary to keep file sizes and dependencies down.
 - Packaged in a separate binary to keep file sizes and dependencies down.
-- Uses .NET 6.
+- Supports .NET 6 and higher.
 
 
    - Full support for the C# 10.0 syntax and features.
    - Full support for the C# 10.0 syntax and features.
 
 
-- Supports Windows, Linux and macOS. Mobile/web platforms are currently
-  unsupported. To use C# on mobile/web platforms, use Godot 3 instead.
+- Supports Windows, Linux, and macOS. As of 4.2 experimental support for Android
+  is also available (requires a .NET 7.0 project).
+
+   - On the Android platform only some architectures are supported: ``arm64`` and ``x64``.
+   - iOS and web platforms are currently unsupported. To use C# on those platforms,
+     consider Godot 3 instead.
+
 - Using an external editor is recommended to benefit from IDE functionality.
 - Using an external editor is recommended to benefit from IDE functionality.
 
 
 **GDExtension (C, C++, Rust, D, ...):**
 **GDExtension (C, C++, Rust, D, ...):**

+ 4 - 3
getting_started/step_by_step/scripting_languages.rst

@@ -128,9 +128,10 @@ officially supported .NET option.
 
 
 .. attention::
 .. attention::
 
 
-    Projects written in C# using Godot 4.x currently cannot be exported to
-    Android, iOS and web platforms. To use C# on those platforms, use Godot 3
-    instead.
+    Projects written in C# using Godot 4 currently cannot be exported to iOS
+    and web platforms. To use C# on those platforms, consider Godot 3 instead.
+    Android platform support is available as of Godot 4.2, but is experimental
+    and :ref:`some limitations apply <doc_c_sharp_platforms>`.
 
 
 C++ via GDExtension
 C++ via GDExtension
 ~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~

+ 4 - 14
tutorials/scripting/c_sharp/c_sharp_basics.rst

@@ -6,17 +6,6 @@ C# basics
 Introduction
 Introduction
 ------------
 ------------
 
 
-.. warning::
-
-    .NET support has been heavily modified between Godot 3 and 4. As such, you
-    may still run into some issues, or find spots where the documentation could
-    be improved.
-
-    Please report issues with C# in Godot on the
-    `engine GitHub page <https://github.com/godotengine/godot/issues>`_,
-    and any documentation issues on the
-    `documentation GitHub page <https://github.com/godotengine/godot-docs/issues>`_.
-
 This page provides a brief introduction to C#, both what it is and
 This page provides a brief introduction to C#, both what it is and
 how to use it in Godot. Afterwards, you may want to look at
 how to use it in Godot. Afterwards, you may want to look at
 :ref:`how to use specific features <doc_c_sharp_features>`, read about the
 :ref:`how to use specific features <doc_c_sharp_features>`, read about the
@@ -29,9 +18,10 @@ it is implemented with .NET 6.0.
 
 
 .. attention::
 .. attention::
 
 
-    Projects written in C# using Godot 4.x currently cannot be exported to
-    Android, iOS and web platforms. To use C# on those platforms, use Godot 3
-    instead.
+    Projects written in C# using Godot 4 currently cannot be exported to iOS
+    and web platforms. To use C# on those platforms, consider Godot 3 instead.
+    Android platform support is available as of Godot 4.2, but is experimental
+    and :ref:`some limitations apply <doc_c_sharp_platforms>`.
 
 
 .. note::
 .. note::
 
 

+ 2 - 5
tutorials/scripting/c_sharp/c_sharp_exports.rst

@@ -1,10 +1,7 @@
 .. _doc_c_sharp_exports:
 .. _doc_c_sharp_exports:
 
 
-C# exports
-==========
-
-Introduction to exports
------------------------
+C# exported properties
+======================
 
 
 In Godot, class members can be exported. This means their value gets saved along
 In Godot, class members can be exported. This means their value gets saved along
 with the resource (such as the :ref:`scene <class_PackedScene>`) they're
 with the resource (such as the :ref:`scene <class_PackedScene>`) they're

+ 2 - 2
tutorials/scripting/c_sharp/c_sharp_features.rst

@@ -1,7 +1,7 @@
 .. _doc_c_sharp_features:
 .. _doc_c_sharp_features:
 
 
-C# features
-===========
+C# language features
+====================
 
 
 This page provides an overview of the commonly used features of both C# and Godot
 This page provides an overview of the commonly used features of both C# and Godot
 and how they are used together.
 and how they are used together.

+ 41 - 4
tutorials/scripting/c_sharp/index.rst

@@ -1,5 +1,13 @@
-C#
-===
+C#/.NET
+=======
+
+C# is a high-level programming language developed by Microsoft. Godot supports
+C# as an option for a scripting language, alongside Godot's own :ref:`GDScript<toc-learn-scripting-gdscript>`.
+
+The standard Godot executable does not contain C# support out of the box. Instead,
+to enable C# support for your project you need to `download a .NET version <https://godotengine.org/download/>`_
+of the editor from the Godot website.
+
 
 
 .. toctree::
 .. toctree::
    :maxdepth: 1
    :maxdepth: 1
@@ -7,11 +15,40 @@ C#
 
 
    c_sharp_basics
    c_sharp_basics
    c_sharp_features
    c_sharp_features
+   c_sharp_style_guide
+   diagnostics/index
+
+Godot API for C#
+----------------
+
+As a general purpose game engine Godot offers some high-level features as a part
+of its API. Articles below explain how these features intergrate into C# and how
+C# API may be different from GDScript.
+
+.. toctree::
+   :maxdepth: 1
+   :name: toc-learn-scripting-C#-differences
+
    c_sharp_differences
    c_sharp_differences
    c_sharp_collections
    c_sharp_collections
    c_sharp_variant
    c_sharp_variant
    c_sharp_signals
    c_sharp_signals
    c_sharp_exports
    c_sharp_exports
    c_sharp_global_classes
    c_sharp_global_classes
-   c_sharp_style_guide
-   diagnostics/index
+
+.. _doc_c_sharp_platforms:
+
+C# platform support
+-------------------
+
+As of Godot 4.2 projects written in C# support all desktop platforms (Windows, Linux,
+and macOS), as well as Android. Android support is currently experimental and has a few
+limitations.
+
+- Projects targeting Android need to be created using .NET 7.0 or higher. This requires
+  modifying the `.csproj` file generated by Godot.
+
+- Only some Android architectures are supported: ``arm64`` and ``x64``.
+
+Currently, projects written in C# cannot be exported to iOS and web platforms. To use C#
+on those platforms, consider Godot 3 instead.

+ 2 - 5
tutorials/scripting/gdscript/gdscript_exports.rst

@@ -1,10 +1,7 @@
 .. _doc_gdscript_exports:
 .. _doc_gdscript_exports:
 
 
-GDScript exports
-================
-
-Introduction to exports
------------------------
+GDScript exported properties
+============================
 
 
 In Godot, class members can be exported. This means their value gets saved along
 In Godot, class members can be exported. This means their value gets saved along
 with the resource (such as the :ref:`scene <class_PackedScene>`) they're
 with the resource (such as the :ref:`scene <class_PackedScene>`) they're