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

相关推荐
qq_25183645711 分钟前
理发管理系统 —— 会员模块
开发语言·前端·python·flask
Dovis(誓平步青云)14 分钟前
几个方案来回选不定?做一个随时切换的候选推荐页
android·java·服务器·开发语言·javascript·数据库·智能化
郝学胜-神的一滴17 分钟前
AI 编程智能体 03:拆解当下主流智能体能力
开发语言·c++·人工智能·python·程序人生·游戏
言乐622 分钟前
Python文字审核模型
开发语言·windows·python·django·pygame
Cc.Y1 小时前
Java零基础入门:方法(函数)深度掌握
java·开发语言
老王爱玩车1 小时前
工具函数——清空输入缓冲区
c语言·开发语言·学习
奋发向前wcx1 小时前
CSP-J复赛模拟赛1 王晨旭补题 2026.10.2
java·开发语言
周杰伦fans1 小时前
轻量模型高并发推理优化技巧
开发语言·人工智能·c#
Frank_refuel1 小时前
【C++项目】手撕JRpc框架(单机怎么优化到分布式思想)
开发语言·c++
周杰伦fans2 小时前
C#对话摘要降低Token消耗
人工智能·后端·c#