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

相关推荐
勤奋的知更鸟4 分钟前
LLaMA-Factory和python版本的兼容性问题解决
开发语言·python·llama-factory
CIb0la6 分钟前
Ai自动补全编程工具:llama vscode
运维·开发语言·学习·测试工具·程序人生
1candobetter16 分钟前
JAVA后端开发——多租户
java·开发语言
freyazzr37 分钟前
C++八股 | Day3 | 智能指针 / 内存管理 / 内存分区 / 内存对齐
开发语言·c++
序属秋秋秋43 分钟前
《C++初阶之入门基础》【普通引用 + 常量引用 + 内联函数 + nullptr】
开发语言·c++·笔记
星辰离彬44 分钟前
Java 高级泛型实战:8 个场景化编程技巧
java·开发语言·后端·程序人生
纨妙44 分钟前
python打卡day47
开发语言·python
ghost1431 小时前
C#学习第29天:表达式树(Expression Trees)
开发语言·c#
Auscy1 小时前
JavaScript 数组学习总结
开发语言·javascript·学习
虾球xz1 小时前
CppCon 2015 学习:Transducers, from Clojure to C++
开发语言·c++·学习