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

相关推荐
言乐61 小时前
Python游戏水平测试辅助系统
开发语言·python·游戏·django·pygame
yuhulkjv3356 小时前
Claude表格复制到word不再崩溃,AI导出鸭批量导出+格式无损一键搞定
人工智能·ai·c#·word·ai导出鸭
WWJA王文举8 小时前
I²C通信完整流程详解:START、地址、ACK、数据、Repeated START和STOP一次讲透
c语言·开发语言
zhanghaha13149 小时前
Python进阶教程:6_JSON 数据解析 —— 新手完全指南
开发语言·python·json
qq_4480111610 小时前
C语言中的动态内存分配
c语言·开发语言·php
汉字萌萌哒11 小时前
2024CSP-J入门级C++真题详解
开发语言·c++
arbboter11 小时前
【网络工具】NetProxy网络代理用户手册
开发语言·网络·c#·网络代理·网络异常·代理工具
2401_8582861111 小时前
VSCODE远程链接错误: 无法建立链接,过程试图写入的管道不存在的解决方法
ide·vscode·编辑器
像风一样自由202011 小时前
加强版VScode结合remote-ssh远程连接服务器开发指南
服务器·vscode·ssh
微小冷11 小时前
海康威视相机C#二次开发环境配置
数码相机·c#·.net·海康威视·相机开发