Xcode¶
Xcode is a free macOS-only IDE. You can download it from the Mac App Store.
Импортирование проекта¶
From Xcode's main screen create a new project using the Other > External Build System template.

Open your build targets from the Targets section and select the Info tab.
Fill out the form with the following settings:
Build Tool
A full path to the scons executable, e.g. /usr/local/bin/scons
Arguments
See Введение в систему сборки for a full list of arguments.
Directory
A full path to the Godot root folder

Add a Command Line Tool target which will be used for indexing the project by choosing File > New > Target....

Select OS X > Application > Command Line Tool.

Примечание
Назовите его так, чтобы вы знали, что не нужно компилировать с этой целью (например, GodotXcodeIndex
).
Для этой цели откройте вкладку Build Settings и найдите Header Search Paths.
Установите в Header Search Paths абсолютный путь к корневой папке Godot. Вам также нужно включить подкаталоги. Для этого добавьте две звездочки (
**
) в конец пути, например/Users/me/repos/godot-source/**
.Add the Godot source to the project by dragging and dropping it into the project file browser.
Снимите флажок Create external build system project.

Далее выберите Создать группы (Create groups) для опции Добавленные папки (Added folders) и отметьте только (only) вашу цель индексирования командной строки в разделе Добавить в цели (Add to targets).

Xcode will now index the files. This may take a few minutes.
Once Xcode is done indexing, you should have jump-to-definition, autocompletion, and full syntax highlighting.
Debugging the project¶
To enable debugging support you need to edit the external build target's build and run schemes.
Откройте редактор схемы внешней цели сборки.
Найдите раздел Build > Post Actions.
Add a new script run action
Under Provide build settings from select your project. This allows to reference the project directory within the script.
Создайте скрипт, который даст двоичному файлу имя, которое Xcode может распознать, например:
ln -f ${PROJECT_DIR}/godot/bin/godot.osx.tools.64 ${PROJECT_DIR}/godot/bin/godot

Соберите внешнюю цель сборки.
Откройте редактор схем снова и выберите Run.

Установите Executable на файл который вы присоединили к вашему скрипту сборки.
Проверьте Debug executable.
You can add two arguments on the Arguments tab: the
-e
flag opens the editor instead of the project manager, and the--path
argument tells the executable to open the specified project (must be provided as an absolute path to the project root, not theproject.godot
file).
Чтобы проверить, что все работает, поместите точку останова в platform/osx/godot_main_osx.mm
и запустите проект.
Если у вас возникнут какие-либо проблемы, обратитесь за помощью в один из каналов сообщества Godot.