Godot4 C# vscode开发环境搭建

用vscode搭建Godot4 C# 开发环境搭建

软件

  1. Godot .Net版本: 下载链接
  2. vscode :自行下载
  3. .netcore7:.netcore6可能也行
  4. vscode插件:

Godot配置

1.配置文件用VSCode打开

2.生成C#项目

项目-->工具-->C#->Create C# Solution,

项目文件如下:

vscode配置

1.打开工程目录

2.创建launch.json与task.json:按.netcore配置,godot插件不顶用

ctrl+shift+p
launch.json :"program"换成自己路径

javascript 复制代码
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "D:/1.learn/2.godot/Godot_v4.1.1-stable_mono_win64/Godot_v4.1.1-stable_mono_win64.exe",
            "console": "internalConsole",
            "stopAtEntry": false
        }
    ]
}

task.json

javascript 复制代码
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "command": "dotnet",
            "type": "shell",
            "args": [
                "build",
                // Ask dotnet build to generate full paths for file names.
                "/property:GenerateFullPaths=true",
                // Do not generate summary otherwise it leads to duplicate errors in Problems panel
                "/consoleloggerparameters:NoSummary"
            ],
            "group": "build",
            "presentation": {
                "reveal": "silent"
            },
            "problemMatcher": "$msCompile"
        }
    ]
}

结果

参考

1\]: 【Godot 4 中文教程:在Godot 4中使用Visual Studio和VS Code集成C#脚本!】 https://www.bilibili.com/video/BV1gg41187kK

相关推荐
技术小甜甜18 小时前
【Godot】【入门】信号系统从 0 到 1(UI/玩法彻底解耦的通用写法)
ui·游戏引擎·godot
缘如风18 小时前
Qt Creator 断点调试断点停不住
开发语言·qt
ghie909018 小时前
MATLAB中实现基于高斯混合模型(GMM)的心电信号两级分类
开发语言·matlab·分类
Kapaseker18 小时前
C# 斩获TIOBE年度编程语言
c#·编程语言
勘察加熊人18 小时前
python实现批量中英文文件翻译
开发语言·windows·python
福楠18 小时前
模拟实现list容器
c语言·开发语言·数据结构·c++·list
listhi52018 小时前
基于MATLAB实现高斯混合模型(GMM)与马尔可夫模型结合
开发语言·matlab
工业甲酰苯胺18 小时前
使用 C# 和 SQL Server 自动化邮件中的用户分配数据处理
数据库·c#·自动化
njsgcs18 小时前
ue4 开放exec接口 vscode mcp铺垫 unreal.register_slate_post_tick_callback
ide·vscode·ue4
雨大王51218 小时前
数字孪生如何助力汽车零部件企业实现柔性生产?
开发语言·人工智能·python