Swift Godot Helper
Build Swift GDExtensions and Debug Godot 4 without leaving VS Code.
Supports Mac/Windows/Linux
Health Checks:
- Godot version
- Swift version
- Visual Studio 2022 (Windows)
- Package.swift
- .gdextension
- project.godot
- export_presets.cfg
Scaffolding:
- Swift package
- New Godot project
.gdextension file
Tasks:
Build GDExtension
Stage GDExtension into Godot project
Run project
Build/Stage and Build/Stage/Run
Import assets into Godot project
Export project using export_presets.cfg
Run and Debug
Includes a launch.json that attaches the VSCode debugger to Godot.
On macOS, app hardening prevents attaching a debugger.
The fix is to re-sign a copy of the app.
Copy /Applications/Godot.app to /Applications/GodotDebug.app.
Create this file:
<!-- godot-debug.entitlements -->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
<key>com.apple.security.get-task-allow</key><true/>
<key>com.apple.security.cs.disable-library-validation</key><true/>
</dict></plist>
- Run this command:
codesign --force --deep --sign - --entitlements godot-debug.entitlements /Applications/GodotDebug.app/
- Point to this copy of Godot in the extension settings.
| |