Unity Builder Bot

Mopsicus
2 min readJun 14, 2022

--

Telegram bot and editor extension for building Unity projects. Can be used separately, but designed to work together. All sources are linked.

Unity Builder Helper
Unity Builder Helper settings

Telegram bot is written in Node.js and Telegraf.js. It can pull updates, run a build of a unity project, build an Xcode project (on a Mac), sign everything, upload it to the server and send a link. Builds for iOS can also be installed via the link, the developer manifest is connected there.

Main functions:

  • add project from git repository
  • delete project
  • get a list of all projects
  • checkout branch
  • pull update
  • build unity project
  • build Xcode project
  • compile, archive, export to IPA
  • generate html page with links
  • upload all files to server via sshpass
  • get logs
  • clear logs and builds

All this can be done using telegrams without even starting Unity. Each build step is logged and notified by the bot.

The editor extension allows you to quickly switch between platforms, enable defines, run a local and remote build on the bot, set data for the Keystore, the necessary dependencies for Huawei, add localizations for iOS, and add third-party files to the build. There is a demo with a set of files and an approximate structure.

Main functions:

  • change platform
  • set defines
  • choose a folder for builds for each platform
  • change version, build number
  • set data for Keystore
  • add locales and *.lproj files to Xcode project
  • add frameworks and extra files to Xcode project
  • add and apply google-services.json and agconnect-services.json
  • add extra files to apk
  • patch AndroidManifest.xml
  • patch gradle files
  • add dependencies for Huawei build
  • build unity project

It turned out somehow like this, I think it will be useful and interesting for someone to pick up the source code. Subscribe to the Telegram channel, there posts appear more often %)

--

--

No responses yet