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

相关推荐
(Charon)3 分钟前
【C++】网络缓冲区设计(二):Ring Buffer环形缓冲区、head/tail与跨界读写
开发语言·c++
Java后端的Ai之路13 分钟前
LangChain Deep Agents 从入门到企业实战
开发语言·人工智能·python·langchain·deepagents
海盗123415 分钟前
微软技术周报 2026-08-31~09-07:GPT-6 Astra 登陆 Foundry、M365 全球认证故障复盘、C# 15 封闭层级
gpt·microsoft·c#
会飞的拖把17 分钟前
Python文件操作详解:从文件读写到os、shutil模块实战
开发语言·python
RS迷途小书童22 分钟前
Python 解析大疆无人机 SRT 字幕日志
开发语言·python·无人机
点心的游戏开发世界1 小时前
GDScript 入门笔记(十六):文件读写与数据持久化
开发语言·笔记·游戏引擎·godot
会飞的拖把1 小时前
Python序列详解:列表、元组、字符串的通用操作(超详细版)
开发语言·windows·python
reasonsummer1 小时前
【办公类-115-01】20260906育儿知识(家园小报)批量制作(2026年9月-2027年6月)
开发语言·数据库·c#
君顾11 小时前
智慧场馆解决方案小程序系统实战:从架构设计到上线指南
java·开发语言·智慧场馆
zhougl9961 小时前
Dockerfile实战教程
java·开发语言·spring boot