Skip to content

Commit 4413677

Browse files
authored
Merge pull request #8142 from YuriSizov/csharp-support-update
Update the state of C#/.NET support as of 4.2
2 parents 69116a8 + ac728e8 commit 4413677

File tree

7 files changed

+70
-36
lines changed

7 files changed

+70
-36
lines changed

about/list_of_features.rst

+15-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ Platforms
3737
Godot aims to be as platform-independent as possible and can be
3838
:ref:`ported to new platforms <doc_custom_platform_ports>` with relative ease.
3939

40+
.. note::
41+
42+
Projects written in C# using Godot 4 currently cannot be exported to iOS
43+
and web platforms. To use C# on those platforms, consider Godot 3 instead.
44+
Android platform support is available as of Godot 4.2, but is experimental
45+
and :ref:`some limitations apply <doc_c_sharp_platforms>`.
46+
4047
Editor
4148
------
4249

@@ -429,12 +436,17 @@ Scripting
429436
:ref:`C#: <toc-learn-scripting-C#>`
430437

431438
- Packaged in a separate binary to keep file sizes and dependencies down.
432-
- Uses .NET 6.
439+
- Supports .NET 6 and higher.
433440

434441
- Full support for the C# 10.0 syntax and features.
435442

436-
- Supports Windows, Linux and macOS. Mobile/web platforms are currently
437-
unsupported. To use C# on mobile/web platforms, use Godot 3 instead.
443+
- Supports Windows, Linux, and macOS. As of 4.2 experimental support for Android
444+
is also available (requires a .NET 7.0 project).
445+
446+
- On the Android platform only some architectures are supported: ``arm64`` and ``x64``.
447+
- iOS and web platforms are currently unsupported. To use C# on those platforms,
448+
consider Godot 3 instead.
449+
438450
- Using an external editor is recommended to benefit from IDE functionality.
439451

440452
**GDExtension (C, C++, Rust, D, ...):**

getting_started/step_by_step/scripting_languages.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ officially supported .NET option.
128128

129129
.. attention::
130130

131-
Projects written in C# using Godot 4.x currently cannot be exported to
132-
Android, iOS and web platforms. To use C# on those platforms, use Godot 3
133-
instead.
131+
Projects written in C# using Godot 4 currently cannot be exported to iOS
132+
and web platforms. To use C# on those platforms, consider Godot 3 instead.
133+
Android platform support is available as of Godot 4.2, but is experimental
134+
and :ref:`some limitations apply <doc_c_sharp_platforms>`.
134135

135136
C++ via GDExtension
136137
~~~~~~~~~~~~~~~~~~~

tutorials/scripting/c_sharp/c_sharp_basics.rst

+4-14
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@ C# basics
66
Introduction
77
------------
88

9-
.. warning::
10-
11-
.NET support has been heavily modified between Godot 3 and 4. As such, you
12-
may still run into some issues, or find spots where the documentation could
13-
be improved.
14-
15-
Please report issues with C# in Godot on the
16-
`engine GitHub page <https://github.com/godotengine/godot/issues>`_,
17-
and any documentation issues on the
18-
`documentation GitHub page <https://github.com/godotengine/godot-docs/issues>`_.
19-
209
This page provides a brief introduction to C#, both what it is and
2110
how to use it in Godot. Afterwards, you may want to look at
2211
:ref:`how to use specific features <doc_c_sharp_features>`, read about the
@@ -29,9 +18,10 @@ it is implemented with .NET 6.0.
2918

3019
.. attention::
3120

32-
Projects written in C# using Godot 4.x currently cannot be exported to
33-
Android, iOS and web platforms. To use C# on those platforms, use Godot 3
34-
instead.
21+
Projects written in C# using Godot 4 currently cannot be exported to iOS
22+
and web platforms. To use C# on those platforms, consider Godot 3 instead.
23+
Android platform support is available as of Godot 4.2, but is experimental
24+
and :ref:`some limitations apply <doc_c_sharp_platforms>`.
3525

3626
.. note::
3727

tutorials/scripting/c_sharp/c_sharp_exports.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
.. _doc_c_sharp_exports:
22

3-
C# exports
4-
==========
5-
6-
Introduction to exports
7-
-----------------------
3+
C# exported properties
4+
======================
85

96
In Godot, class members can be exported. This means their value gets saved along
107
with the resource (such as the :ref:`scene <class_PackedScene>`) they're

tutorials/scripting/c_sharp/c_sharp_features.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _doc_c_sharp_features:
22

3-
C# features
4-
===========
3+
C# language features
4+
====================
55

66
This page provides an overview of the commonly used features of both C# and Godot
77
and how they are used together.

tutorials/scripting/c_sharp/index.rst

+41-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,54 @@
1-
C#
2-
===
1+
C#/.NET
2+
=======
3+
4+
C# is a high-level programming language developed by Microsoft. Godot supports
5+
C# as an option for a scripting language, alongside Godot's own :ref:`GDScript<toc-learn-scripting-gdscript>`.
6+
7+
The standard Godot executable does not contain C# support out of the box. Instead,
8+
to enable C# support for your project you need to `download a .NET version <https://godotengine.org/download/>`_
9+
of the editor from the Godot website.
10+
311

412
.. toctree::
513
:maxdepth: 1
614
:name: toc-learn-scripting-C#
715

816
c_sharp_basics
917
c_sharp_features
18+
c_sharp_style_guide
19+
diagnostics/index
20+
21+
Godot API for C#
22+
----------------
23+
24+
As a general purpose game engine Godot offers some high-level features as a part
25+
of its API. Articles below explain how these features intergrate into C# and how
26+
C# API may be different from GDScript.
27+
28+
.. toctree::
29+
:maxdepth: 1
30+
:name: toc-learn-scripting-C#-differences
31+
1032
c_sharp_differences
1133
c_sharp_collections
1234
c_sharp_variant
1335
c_sharp_signals
1436
c_sharp_exports
1537
c_sharp_global_classes
16-
c_sharp_style_guide
17-
diagnostics/index
38+
39+
.. _doc_c_sharp_platforms:
40+
41+
C# platform support
42+
-------------------
43+
44+
As of Godot 4.2 projects written in C# support all desktop platforms (Windows, Linux,
45+
and macOS), as well as Android. Android support is currently experimental and has a few
46+
limitations.
47+
48+
- Projects targeting Android need to be created using .NET 7.0 or higher. This requires
49+
modifying the `.csproj` file generated by Godot.
50+
51+
- Only some Android architectures are supported: ``arm64`` and ``x64``.
52+
53+
Currently, projects written in C# cannot be exported to iOS and web platforms. To use C#
54+
on those platforms, consider Godot 3 instead.

tutorials/scripting/gdscript/gdscript_exports.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
.. _doc_gdscript_exports:
22

3-
GDScript exports
4-
================
5-
6-
Introduction to exports
7-
-----------------------
3+
GDScript exported properties
4+
============================
85

96
In Godot, class members can be exported. This means their value gets saved along
107
with the resource (such as the :ref:`scene <class_PackedScene>`) they're

0 commit comments

Comments
 (0)