# cpp

> GDExtension (C++) 脚手架生成。scaffold_gdextension: 在 project_path 下生成完整可编译的 godot-cpp GDExtension 工程骨架（src/类.cpp/.h + register_types + SConstruct + .gdextension + .gitignore + README），不联网/不编译，对齐 godot-cpp 官方 example。

| 属性 | 值 |
|------|-----|
| 所属层 | headless |
| 安全级别 | guarded |
| 需要 Godot | 否 |
| 需要编辑器 | 否 |
| 只读 | 否 |
| 长耗时 | 否 |

## Actions

- `scaffold_gdextension`

## Parameters

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `action` | enum (1 项) | ✓ | 操作类型 |
| `project_path` | string | ✓ | GDExtension 工程生成根目录（须在 ALLOWED_PROJECT_PATHS 内） |
| `class_name` | string |  | 主类名（PascalCase，默认 Example） |
| `parent_class` | string |  | 父类（Godot 内置类白名单，默认 Node） |
| `godot_version` | enum (4 项) |  | Godot 版本（4.4–4.7。决定 godot-cpp clone ref 与 SConstruct api_version、.gdextension compatibility_minimum；4.6/4.7 走 godot-cpp master(v10)+api_version（无 godot-4.x-stable ref），4.4/4.5 用 godot-4.x-stable 分支。默认 4.7） |
| `force` | boolean |  | 目标已存在且非空时是否覆盖（默认 false） |

## 风险分布

写 1

---
<!-- AUTO-GENERATED by scripts/gen-tool-docs.mjs from capability-matrix.json v0.32.21. DO NOT edit manually; re-run npm run gen:tool-docs after tool changes. -->
