Godot 简介
目录结构
Godot 没有严格的目录结构规范,一个空项目包(c#)含,默认文件创建在根目录下
- .godot
- editor
- imported
- mono
- shader_cache
- .gdignore
- global_script_class_cache.cfg
- uid_cache.bin
- icon.svg
- icon.svg.import
- project.godot
Godot C# 环境
-
- 在 Godot 的 Editor(编辑器) → Editor Settings(编辑器设置) 菜单中:
设置 Dotnet(.NET) -> Editor(编辑器) -> External Editor(外部编辑器) 为 Visual Studio Code 。
Godot支持使用命令行命令行教程
vsCode 环境搭建
Godot 断点
launch.json文件
官方文档中的program项输入的是”${env:GODOT4}”,应该是需要配置环境变量,但我直接使用了路径。1
2
3
4
5
6
7
8
9
10
11
12
13
14
15{
"version": "0.2.0",
"configurations": [
{
"name": "Play",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "你的Godot.exe路径",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
}
]
}tasks.json文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build"
],
"problemMatcher": "$msCompile",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
}
]
}
Godot Hello
测试脚本
1 | using Godot; |