Automation in Unity
The time we spend on regular tasks getting more important day by day. Because the development of technology is boosted in the recent years, we have to spend more time to catch it. We’ve daily tasks like keeping track of the news in the industry, following the analytics of live games, following the competitors and new games, etc. As a conclusion our daily tasks increase everyday.
What can we do to handle this problem?
The very first thing we, as developers, should do is automation.
Automate everything possible so don’t spend time on boilerplate daily tasks any more. Reduce the risk of mistakes making things again and again.
So the question is where to start to automating our workflow?
Builds came first in my list. Because once you’ ve a build, then you have to follow the same flow everytime. Other than that some projects require different build profiles like server/client builds, different platform builds, etc. Making the builds manually generally cost too much time as it’s nearly impossible remembering everything and making right if the project has different build profiles.
Having regular builds also is a best practice for todays development environment. This way you might have a better testing flow, smoother development and release cycles. Make the builds your routine instead of crisis 🙂
Ok, let’s talk about how we can automate our builds:
In DreamHarvesters we split builds into two:
- Remote builds
- Local builds
Remote Builds; are the builds made on a remote server like Unity Cloud Build. We setup build configurations for all the projects in our Unity Cloud Build. Our general approach is having test builds from the projects dev branch and release builds from the master branch. Despite using our general setup is sufficient for most of our projects, some projects require more specialized build configurations.
Local Builds; are the builds we’re making in our studio for faster iterations. Although the Unity Cloud Build is a very good solution for automating the builds, it sometimes is not enough for fast iterations because of the resource you might have on Unity Cloud Build. UCB limits you for simultaneous builds and it generally take longer making a build. That’s why local builds are kind of a must even you use UCB.
So what we use to automate our local builds?
We’ ve an open source library:
This is an editor tool which allows you setting up build profiles. After setting the required profiles, you start builds with one click.
Another advantage is having PostProcessBuildActions in the library. These are useful especially you use 3rd party libraries in the project which requires some XCode configurations. To be able to automate these setups on the Cloud Build, we use the same build tool as well.
We’ re actively maintaining and improving the library but any help or suggestion is welcomed 🙂
More with automation will come.