Skip to main content
Devlog

Build Pipeline: 16 builds, two clicks, four stores

Kugle uses 16 builds: the game, the game-server and custom tools, each in production and in development.

All of them are one click away, in an inspector that appears by itself when the Build Settings open.

Each build setup has its own scenes, has platform specific settings, and can move folders and run scripts before and after the build.

A real problem solved: everything around the build

The .env copy, the upload script, pod install with the automatic setup and opening of the Xcode project, the folders the game server does not need. In short: automate, remove frustration and gain time.

The tool appears when the Build Settings open: Ctrl + Shift + B​

What makes a tool great

It saves time, and it needs no documentation. A new programmer opens the build window, like every Unity user: the tool is already there, on the road everybody takes.

A whole cross-platform game studio build pipeline, automated in one click​

The inspector of the Main Build Setup: the current setup, two settings of the project, the platforms, the grid of the sixteen setups, the content of the BREEDING setup and the actions

From top to bottom:

  • The current setup: icon, name, version, platform. The arrows go to the previous and the next one.
  • The important settings (yellow line): any field of any asset of the project.
  • The platforms of the setup (green line): a click switches the project.
  • All the setups, as a grid: a click uses one, a drag moves it.
  • The setup itself: identity, scenes, window, steps before and after the build.
  • The actions: apply the settings, open the build window, run the "before" or "after" steps alone.

The code of the game can ask which build it is in, by name:

if (MainBuildSetup.Instance.IsCurrent("CLIENT", "CLIENT_DEV"))
{
// only in the game itself, not in the server or the tools
}

Any additional variable outside the plugin can be linked from a ScriptableObject. Very useful to collect all the custom variables in one place, and to keep the plugin separate from the project.

Before and after the build​

A setup launches scripts, moves folders and applies platform specifics, before and after the build.

The GAME_SERVER setup, and its File To Move To Runtime list: the file ../.env goes to the Resources folder

The passwords, for example: only the game server build gets a copy of the .env; the game players install never holds them.

From the build to the stores: one pipeline per store​

One game, four stores. Every store has its own steps, its own tools and its own way of saying no. Pick a platform:

The CLIENT build setup, iOS selected among Windows, macOS, iOS and Android

1. One click. Pick the CLIENT setup, choose iOS, build. Unity writes an Xcode project, not an app: the rest happens on the Mac.

The Launch in Prod panel for iOS: Prod or Dev and their two build folders, a Build button, then Setup, Open and Publish for Xcode, and the App Store Connect link

2. One button per step. Prod or Dev, then Build: Setup (pod install) and Open (Xcode) run by themselves after it.

A terminal: the dependencies installed, and a last line, In xcode go to PRODUCT-ARCHIVE-BUILDING-DISTRIBUTEAPP

3. (Automatic) The dependencies. A terminal installs CocoaPods and the plugins, then opens Xcode.

The run destination menu of Xcode: the iPhone plugged in, My Mac, Any iOS Device

4. Xcode opens. Test the game on your iPhone or your Mac, or publish it: with the Publish button of step 2, or with Product > Archive, then Distribute App.

App Store Connect: the Kugle app, the iOS version ready for sale

5. Ship it. Go to App Store Connect with the link of the panel (step 2), and publish it!

The page of Kugle on the App Store

Last step: set the release date in the store. Congratulations! Your build is official. Kugle, live on the App Store.

Additional settings: the store ids, filled in once

The settings panel: the ids of the project in App Store Connect, the Google Play Console and the Epic Games Store, then the defaults and the links of every store (ids hidden)

Every button reads its ids from one panel (App Store Connect, Google Play Console, Epic Games Store), filled in once per game. Below them: the build folder, the Xcode scheme, the archives folder, the Epic upload tool. The Epic secret stays in the .env file: the panel only holds the name of its key.

See also​