One Button to Build Them All


When we worked on FRIGŮL during the game jam, I didn't really have the time to look into our build system. I just had 5 minutes before the deadline and went for a quick Windows release build and be done with it.

But it was important to us that the game could be played on as many platforms as possible, considering that being a gamepad only game would make it niche enough.

Found the Precious

So when working on the next updates after the jam, I went for a classic Windows, macOS and Linux builds, as well as WebGL so you can play directly from the store page. But switching between four platforms in Unity is cumbersome, especially with WebGL build time! Professionally, I'm used to have Jenkins do that work for me, but I wanted something simpler considering the scope of FRIGŮL.

So I did what I usually always do, go on GitHub and look for an open source solution to my problem. And lo and behold, I found it in SuperUnityBuild! A powerful tool with a lot of customization by Chase Pettit. Which is also  simple to work with if you need to modify it, as the code source is actually very easy to read.

Took only a few minutes to set it up to build for our 4 supported platforms. There's even a system of pre/post actions to run, and a library of actions available here, one of them is to actually upload your builds to itch.io. Set that up as well and eventually got the whole process run on the press of one button! That feels good :)

Reforge it

Although I admit that I had to modify the library a little, but hey that's what open source is for!

First problem I encountered was the build size, it was enormous compared to my previous builds. Turned out that there's no compression method to select in SuperUnityBuild UI, so the data of the game was taking too much space (almost double the size). I forked the project and fixed that, I added in the UI an advanced option allowing you to select all the Unity BuildOptions you want, including the compression method.


Another issue I had was that WebGL upload to itch.io wasn't supported, and the way the channel name was generated didn't fit the format I picked initially. Forked the actions project as well, and added these too.

Share it with the Community

I've created pull requests to merge these changes back upstream, but if you are interested, you can find my forks here:
https://github.com/rthery/unity-build
https://github.com/rthery/unity-build-actions

Hopefully this will also save you some time on your projects :)

Next step is setting up a GitLab runner and a Unity Docker image, so that the build is done automatically when I push new release tag to the git repository.

Get FRIGUL

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

Great post 🙂

Will you also be posting a devlog about the Gitlab runner and Unity Docker image when you're done with it?

(+1)

Thanks! Yeah I'll definitely do that :)

Nice! Looking forward to it

I would still be interested to see this, or even better some Github Actions implementation.