소스 정보
- 저장소
- hhhh124hhhh/godot-mcp
- 최근 소스 활동
- 2025년 11월 15일 14:02
- 감지된 SKILL.md 언어
- 중국어
- 스타
- 42
- 포크
- 3
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/hhhh124hhhh/godot-mcp --skill godot-compatibility-checker명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | godot-compatibility-checker |
| description | 自动检测和修复Godot 3.x与4.x之间的API兼容性问题,基于实际项目经验提供针对性解决方案 |
| version | 1.0.0 |
| allowed-tools | Read, Write, Edit, Glob, Grep |
当用户遇到Godot版本相关问题或需要进行版本升级时,自动进行兼容性检查和修复:
问题: Invalid assignment of property or key 'emission_amount' on a base object of type 'ParticleProcessMaterial'
修复方案:
# ❌ Godot 3.x 错误写法
var material = ParticleProcessMaterial.new()
material.emission_amount = 50
material.lifetime = 1.5
# ✅ Godot 4.x 正确写法
var particles = GPUParticles2D.new()
var material = ParticleProcessMaterial.new()
particles.amount = 50 # 属性设置在节点层级
particles.lifetime = 1.5 # 属性设置在节点层级
particles.material = material
问题: interpolate_property() 和 set_looped() 方法不存在
修复方案:
# ❌ Godot 3.x 过时写法
var tween = Tween.new()
tween.interpolate_property(object, "property", start, end, 1.0)
tween.set_looped(true)
# ✅ Godot 4.x 现代写法
var tween = create_tween()
tween.tween_property(object, "property", end, 1.0)
# 使用回调实现循环
func animate_loop():
var tween = create_tween()
# 动画代码...
tween.tween_callback(animate_loop)
问题: 信号连接语法变化
修复方案:
# ❌ Godot 3.x 过时写法
connect("input_event", self, "_on_input_event")
# ✅ Godot 4.x 现代写法
input_event.connect(_on_input_event)
# 或使用lambda表达式
signal.signal_name.connect(func(): print("信号触发"))
问题: 鼠标按钮常量名称变化
修复方案:
# ❌ Godot 3.x 过时写法
if event.button_index == BUTTON_LEFT
# ✅ Godot 4.x 现代写法
if event.button_index == MOUSE_BUTTON_LEFT
问题: has_property() 方法被移除
修复方案:
# ❌ Godot 3.x 过时写法
if node.has_property("custom_property"):
value = node.get("custom_property")
# ✅ Godot 4.x 现代写法
if "custom_property" in node:
value = node.get("custom_property")
# 或更安全的检查
var property_value = node.get("custom_property")
if property_value != null:
value = property_value
原始错误: 粒子属性设置位置错误
修复位置: lines 142, 163, 196, 327
修复内容: 将 material.emission_amount 改为 particles.amount
修复内容:
opopped.emit → popped.emit)create_tween() 而非 Tween.new()ParticleProcessMaterial 而非 ParticlesMaterialin 操作符而非 has_property()call_deferred("queue_free")此技能主要使用以下MCP工具:
# 检测Godot版本 (通过Godot MCP)
await godotMCP.detect_godot_version({ projectPath: './project.godot' })
# 检查API兼容性 (通过Godot MCP)
await godotMCP.check_godot_api_compatibility({
code: fileContent,
targetVersion: '4.x'
})
# 自动修复兼容性问题 (通过Godot MCP)
await godotMCP.fix_godot_api_compatibility({
code: problematicCode,
issueIds: detectedIssues
})
detect_godot_version - 检测项目Godot版本check_godot_api_compatibility - 检查代码兼容性fix_godot_api_compatibility - 自动修复兼容性问题get_godot_migration_advice - 获取迁移建议detect_godot_version 确定当前和目标版本check_godot_api_compatibility 全面扫描代码fix_godot_api_compatibility 自动修复问题get_godot_migration_advice 获取最佳实践建议