【发布时间】:2022-10-17 10:49:59
【问题描述】:
Godot 4.0 beta 附带了 C# 支持,据报道,它在 Visual Studio 中支持热重载,开箱即用。
我想让它在我没有 Visual Studio 的 Mac 上运行。我将launchSettings.json 放入我的Godot 项目中的“Properties/launchSettings.json”中,其中包含以下内容(取自Visual Studio 自动生成的内容):
{
"profiles": {
"Development": {
"commandName": "Executable",
"executablePath": "/path/to/Godot_csharp_b1.app/Contents/MacOS/Godot",
"commandLineArgs": "--debug-server tcp://127.0.0.1:6666",
"workingDirectory": "/path/to/my/project",
"authenticationMode": "None",
"remoteDebugEnabled": false,
"remoteDebugMachine": ""
}
}
}
现在我尝试这样做:
dotnet watch run --launch-profile Development
但是,它不起作用。它给出了这个错误:
The launch profile "Development" could not be applied.
The launch profile type 'Executable' is not supported.
Unable to run your project.
Ensure you have a runnable project type and ensure 'dotnet run' supports this project.
A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'.
The current OutputType is 'Library'.
有可能解决这个问题吗?我可以接受任何在 MacOS 上通过热重载运行 Godot 的方式——命令行或其他任何方式。
如果这很重要,我在 MacOS + M1 上。
【问题讨论】:
标签: c# godot dotnet-cli