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 GDScript.

标准的 Godot 可执行文件并不自带 C# 支持。要为你的项目启用 C# 支持,你需要从 Godot 网站 下载 .NET 版本 的编辑器。

C# 的 Godot API

Godot 是一个通用的游戏引擎,它提供了一些高级功能作为它的 API 的一部分。下面的文章介绍了这些功能如何与 C# 集成,以及 C# API 和 GDScript 之间可能存在的差异。

C# 平台支持

参见

See 系统需求 for hardware and software version requirements for the Godot engine.

备注

Since C# projects use the .NET runtime, also check the system requirements for the version of .NET that you'll be using. See supported OS.

Since 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.

iOS 支持目前是实验性的,存在部分限制。

  • 用于 iOS 模拟器的官方导出模板仅支持 x64 架构。

  • 导出到 iOS 只能从 MacOS 设备上完成。

目前,用 C# 编写的项目无法导出到 Web 平台。要在该平台上使用 C#,请考虑 Godot 3。