Renaming Unity Cloud Builds - Automation Tool
I use Unity Cloud Builds for automating the build process for Unity Pomodoro, an open source pomodoro timer I've been working on. (Currently working on getting it published on the Google Play Store) Unity Cloud Builds are great, but in each release I have to manually re-name the downloaded files to remove unneeded bits of information and include the version number. I wanted to create a script that would streamline this process a bit.
First, let's take a look at how Unity Cloud Build files are named.
Here's what a Windows (64-bit) variation gets named as:
UCB Naming Formula
Seems like the Unity Cloud Build naming convention formula is:
- Author Name
- Project Name
- Target Label
- 'Default' Keyword
- Increment/Index Number
I personally don't like including author name, see the 'default' keyword as being unnecessary (though can be changed in the UCB config itself), and see no use for the UCB increment number. I would prefer it also included the application version number instead of something arbitrary for users.
So I decided to create a nifty little script to automate the renaming process like so...
There are better ways to do the string replacements, but I'm not worried about performance or efficiency in this case. Just looking to automate something that I do for each release to minimize on manual work. Less time spent authoring builds/creating releases and more time writing code/features/etc...
It's a custom editor window built in Unity using the latest UI Toolkit.
Since it's a UI Toolkit, you'll also need the accompanying UXML file to build the layout.
Feel free to use it in your projects! If you got any questions or improvements, reach out or leave a comment on the gist.
Till next time! 👋