Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.



平台配置正确并且将支持的设备连接到电脑上之后,就可以使用一键部署功能。因为能出错的地方太多了(平台可能没有配置正确、SDK 可能没有正确安装、设备可能配置错了等等),所以最好让用户先知道有这样的功能。

添加 Android 导出预设项并且标记为可执行之后,Godot 就可以检测到有 USB 设备插到了电脑上,并且允许用户在该设备上自动导出、安装、然后运行(调试模式的)项目。这个功能就叫 一键部署




  • Android: 将在导出项目时启用调试,并在连接的设备上运行。

    • 请确认已经按照 为 Android 导出 中提到的步骤进行操作,否则不会出现一键部署按钮。

    • 如果你连接的设备超过一台,Godot会询问你想导出项目到哪台设备。

  • iOS: Exports the project with debugging enabled and runs it on the connected device or simulator.

    • Make sure to follow the steps described in 为 iOS 导出. Otherwise, the one-click deploy button won't appear.

    • For each new bundle identifier, export the project, open it in the Xcode, and build at least once to create new provisioning profile or create a provisioning profile in the Apple Developer account dashboard.

    • 如果你连接的设备超过一台,Godot会询问你想导出项目到哪台设备。

  • Desktop platforms: Exports the project with debugging enabled and runs it on the remote computer via SSH.

  • Web: Starts a local web server and runs the exported project by opening the default web browser. This is only accessible on localhost by default. See Troubleshooting for making the exported project accessible on remote devices.


  • Android:
    • Enable developer mode on your mobile device then enable USB debugging in the device's settings.

    • After enabling USB debugging, connect the device to your PC using a USB cable.

    • 如果你是高级用户,也可以使用无线ADB。

  • iOS:
    • Install Xcode, accept Xcode license and login with your Apple Developer account.

    • If you are using Xcode 14 or earlier, install ios-deploy and set path to ios-deploy in the Editor Settings (see Export ⇾ iOS ⇾