# 에디터 없이 게임만 바로 실행합니다. 사용: 우클릭 > PowerShell로 실행, 또는 .\run.ps1 $godot = & "$PSScriptRoot\find-godot.ps1" if (-not $godot) { Write-Error "Godot 4를 찾을 수 없습니다. 실행 파일 경로를 GODOT_BIN 환경 변수에 넣어 주세요." exit 1 } # 클론 직후엔 .godot이 없다. 한 번 가져와야 class_name이 등록되고 스크립트가 뜬다. if (-not (Test-Path "$PSScriptRoot\.godot")) { Write-Host "첫 실행입니다. 프로젝트를 가져오는 중..." $importer = & "$PSScriptRoot\find-godot.ps1" -Console if (-not $importer) { $importer = $godot } & $importer --headless --import --path $PSScriptRoot if ($LASTEXITCODE -ne 0) { Write-Error "가져오기에 실패했습니다." exit 1 } } Start-Process -FilePath $godot -ArgumentList @("--path", $PSScriptRoot) -WorkingDirectory $PSScriptRoot