mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
This allows users to leave comments on pages that don't have `:allow_comments: False` somewhere in the page's source. Both manual and class reference pages can receive comments. Index pages cannot have comments, as discussion should occur on "leaf" pages. GitHub Discussions is used as a backend on the same repository. This means that Discussions *must* be enabled on godotengine/godot-docs before this commit is merged to `master`. Users can choose to use the "Custom" watch mode if they don't want to get notifications for discussion updates, but still get notifications for issue and pull request updates. User comments are intended to be used for the following purposes: - Add a clarification or correct something in the documentation, without having to open a pull request. Contributors are encouraged to take a look at discussions from time to time, and see if there's information worth incorporating in the pages themselves. Don't forget to reply to the comment when doing so :) - Mention a workaround for a common issue. - Link to useful third-party resources that are relevant to the current page, such as tutorials or add-ons. User comments should *not* be used for technical support. Other community platforms should be used for that. Page-to-discussion matching is done using the `pagename` Sphinx variable, which is independent of the Godot version and documentation language. Being independent of the Godot version allows keeping old comments when the Godot version changes, while also allowing users from `/stable` and `/4.1` to "see" each other in discussions. See https://giscus.app for more information.
78 lines
2.4 KiB
ReStructuredText
78 lines
2.4 KiB
ReStructuredText
:allow_comments: False
|
|
|
|
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::
|
|
:maxdepth: 1
|
|
:name: toc-learn-scripting-C#
|
|
|
|
c_sharp_basics
|
|
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 integrate 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_collections
|
|
c_sharp_variant
|
|
c_sharp_signals
|
|
c_sharp_exports
|
|
c_sharp_global_classes
|
|
|
|
.. _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 and iOS.
|
|
|
|
Android support is currently experimental and has a few limitations.
|
|
|
|
- Projects targeting Android need to target .NET 7.0 or higher. This requires
|
|
modifying the `.csproj` file generated by Godot for existing projects.
|
|
The following property is added to new projects created with 4.2 and can be
|
|
added to existing projects:
|
|
|
|
.. code-block:: xml
|
|
|
|
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
|
|
|
|
- Only some Android architectures are supported: ``arm64`` and ``x64``.
|
|
|
|
iOS support is currently experimental and has a few limitations.
|
|
|
|
- Projects targeting iOS need to target .NET 8.0 or higher. This requires
|
|
modifying the `.csproj` file generated by Godot for existing projects.
|
|
The following property is added to new projects created with 4.2 and can be
|
|
added to existing projects:
|
|
|
|
.. code-block:: xml
|
|
|
|
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
|
|
|
|
- The official export templates for the iOS simulator only supports the ``x64`` architecture.
|
|
|
|
- Exporting to iOS can only be done from a MacOS device.
|
|
|
|
Currently, projects written in C# cannot be exported to the web platform. To use C#
|
|
on that platform, consider Godot 3 instead.
|