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

相关推荐
a程序小傲10 分钟前
得物Java面试被问:方法句柄(MethodHandle)与反射的性能对比和底层区别
java·开发语言·spring boot·后端·python·面试·职场和发展
故事不长丨11 分钟前
深度解析C#文件系统I/O操作:File类与FileInfo类的核心用法与场景对比
c#·文件系统·file·fileinfo·i/o操作·i/o流
独自破碎E17 分钟前
比较版本号
java·开发语言
zimoyin24 分钟前
浅浅了解下0拷贝技术
java·linux·开发语言
AI架构师易筋28 分钟前
AIOps 告警归因中的提示工程:从能用到可上生产(4 阶梯)
开发语言·人工智能·llm·aiops·rag
你的冰西瓜36 分钟前
C++中的array容器详解
开发语言·c++·stl
随丶芯1 小时前
IDEA安装leetcode-editor插件
java·开发语言
Ccjf酷儿1 小时前
C++语言程序设计 (郑莉)第六章 数组、指针和字符串
开发语言·c++
啊湘1 小时前
VSCODE英文界面切换为中文(适用CURSOR等使用)
ide·vscode·编辑器·bug·cursor
禹曦a1 小时前
Java实战:Spring Boot 构建电商订单管理系统RESTful API
java·开发语言·spring boot·后端·restful