gamedev-skills/awesome-gamedev-agent-skills

godot-export

Exports Godot 4.7 projects: templates, exportpresets.cfg for desktop, Web and Android, command-line exports and web COOP/COEP headers.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill godot-export

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Godot Export & Builds (4.x)

Turn a project into builds from export presets on the command line, then prove the build runs. Targets Godot 4.7; export templates must match the editor version exactly, so read config/features in project.godot and the CI's Godot version first.

Workflow

  1. Read `export_presets.cfg`. Each [preset.N] has a name (what the CLI wants), a

platform and an export_path. If the file is missing, create presets in Project > Export or ask the user to; avoid hand-writing a full preset from nothing.

  1. Install matching templates (Editor > Manage Export Templates, or unpack the

.tpz so its files land in the folder the error message names, for example ~/.local/share/godot/export_templates/4.7.2.stable/ on Linux). --export-pack needs none.

  1. Export from the CLI, from the project folder, into a folder that already exists:

godot --headless --export-release "<preset name>" build/<platform>/<file>.

  1. Per platform: Web needs COOP/COEP headers only when the preset's Thread Support is

on (off by default); Android needs SDK paths and a keystore; macOS needs signing and notarization to pass Gatekeeper.

  1. Verify before you finish:
  • The export command exits 0 and the output file exists. A non-zero exit always means

failure (missing template, unknown preset, unwritable path); the reason is in the log.

  • Smoke-run the exported data without templates: godot --headless --path <project> --export-pack "<preset>" build/game.pck,

then godot --headless --main-pack build/game.pck --quit-after 300 > run.log 2>&1 and grep -nE "SCRIPT ERROR|^ERROR:" run.log. This catches files the preset's filters left out and res:// writes, because it loads only what was packed.

  • For a Linux or server build, run the binary itself the same way:

./build/linux/game.x86_64 --headless --quit-after 300.

  • Platforms you cannot run here (consoles, iOS, a signed macOS app, phones): ask the user

to launch the build on the device and report whether it starts, saves and loads.

Patterns

1. Command-line exports

bash
mkdir -p build/windows build/linux build/web          # Godot will not create the folder
godot --headless --export-release "Windows Desktop" build/windows/game.exe
godot --headless --export-release "Linux"           build/linux/game.x86_64
godot --headless --export-release "Web"             build/web/index.html
godot --headless --export-debug   "Windows Desktop" build/windows/game_debug.exe
godot --headless --export-pack    "Linux"           build/game.pck   # .zip for a ZIP pack
godot --headless --export-patch   "Linux"           build/patch1.pck --patches build/game.pck

2. Detect the build at runtime

gdscript
func _ready() -> void:
    if OS.has_feature("dedicated_server") or DisplayServer.get_name() == "headless":
        start_server_only()           # skip rendering and UI
    if OS.has_feature("web"):
        apply_web_settings()
    if OS.has_feature("demo"):        # a custom tag set in one preset's Features
        limit_content()

3. Write paths that survive export

gdscript
const SAVE_PATH := "user://savegame.tres"   # res:// is read-only inside a .pck

func _ready() -> void:
    print(OS.get_user_data_dir())           # where user:// lives on this platform

Gotchas

  • `No export template found at the expected path` → templates are missing or for another

version (including beta/rc). Install the exact version; 4.7 can download one platform's templates instead of the full set.

  • `Invalid export preset name: ...` → names are case- and space-sensitive; the output

then lists the presets it found. Quote the name.

  • `Can't open file for writing` → the output folder does not exist. mkdir -p first.
  • A file is missing only in the build → non-resource files (.json, .txt, .csv) are

not exported unless listed in the preset's Filters to export non-resource files (include_filter="*.json"). Resources excluded by exclude_filter vanish too.

  • Saving works in the editor, fails in the build → the game writes under res://. Use

user://.

  • Web build: blank page or `SharedArrayBuffer` error → Thread Support is on and the host

does not send Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp. Turn threads off, enable the host's option (itch.io has one), or use the PWA option that adds the headers. file:// never works.

  • Web build looks different → web always uses the Compatibility renderer.
  • C# project will not export to web → not supported in Godot 4; see godot-csharp.
  • Secrets end up in Git → keystore passwords and encryption keys live in

.godot/export_credentials.cfg, not export_presets.cfg. Keep .godot/ ignored and supply secrets in CI through environment variables or a restored file.

  • Shipping a debug build → --export-debug keeps the remote debugger and debug checks;

ship --export-release.

References

  • Read references/presets-and-cli.md for the export_presets.cfg layout, every useful CLI

flag, feature tags, web, Android and Apple setup, PCK patches and DLC, and why PCK encryption needs custom templates.

Related skills

  • godot-gdscript-headless-testing: tests before the export step in CI.
  • godot-multiplayer: the dedicated-server code you export.
  • godot-csharp: .NET export limits.
  • steam-publish / itch-publish: getting the build to players.

Version notes

Last verified: 2026-11-11 against the Godot 4.7.2 CLI help and a 4.7.2 headless export of a test project (pack export and --main-pack run; template exports were checked only for their failure messages, since no templates were installed).

  • Godot 4.7.2 (August 2026) is the current stable release; 4.8 is in beta.
  • Web Thread Support is off by default since 4.3; web exports always use Compatibility.
  • 4.7 adds per-platform template downloads. Confidential export options have lived in

.godot/export_credentials.cfg since at least 4.2.

Exporting projects, Exporting for the Web, Command line tutorial, main.cpp @ 4.7.2.

같은 저장소의 Skills

더 많은 Skills

모든 Skills
gamedev-skills
커뮤니티

game-ui-ux

Engine-neutral design rules for game HUDs and menus: anchors and containers, scaling, safe areas, gamepad focus, HUDs driven by events instead of polling, and accessibility minimums. Use for menus, health bars or inventory screens that break on ultrawide or phones. Pair with godot-ui-control or roblox-ui. Not for button juice (game-feel) or rebinding (input-systems).

24시간 설치 수
433
GitHub Stars
1만
업데이트
11월 12일
gamedev-skills
커뮤니티

game-feel

Adds engine-neutral juice to a working mechanic: trauma-based screen shake, hit-stop, eased tweens, squash and stretch, and knockback. Use when the game feels flat, weightless or not punchy, or hits and jumps should feel satisfying. Not for coyote time (platformer), input buffering (input-systems), camera follow (camera-systems) or HUD layout (game-ui-ux).

24시간 설치 수
431
GitHub Stars
1만
업데이트
11월 12일
gamedev-skills
커뮤니티

create-game-assets

Plans, generates or sources, and validates consistent game art: style guides, sprites, pixel art, tilesets, icons and textures, with QA and licence records. Use when making or AI-generating game art, fixing fake transparency, or checking Steam AI disclosure. Not for engine import (godot-tilemap, godot-animation, unity-tilemap-2d), UI layout (game-ui-ux) or sound (audio-design).

24시간 설치 수
365
GitHub Stars
1만
업데이트
11월 12일
gamedev-skills
커뮤니티

performance-optimization

Finds and fixes game frame-rate problems by measurement in Godot, Unity, Unreal or Roblox: CPU- vs GPU-bound, then the biggest fix (draw calls, pooling, GC spikes). Use for low FPS, stutter, a first-use hitch, or requests to optimize or profile. Not for build size (unity-build-size), physics jitter (physics-tuning) or network lag (roblox-networking, godot-multiplayer).

24시간 설치 수
360
GitHub Stars
1만
업데이트
11월 12일