Today's devlog will be a bit longer and more on the techy side of things. It's been something I've been struggling with and feel the need to vent about as well.
I've been working on updating my workflow with builds, uploading to itch, and uploading the game data (Unity Addressables) to the cloud. With the amount of builds that will need to be done, I can't possible manually do it anymore. In fact, idk how I managed to deal with it for so long either.
My current workflow went like this:
- Switch platforms in Unity (1-2 mins)
- Clear addressables cache since it's been broken for months, and will add up to 5 minutes to a given build time if i forget
- Build the game (5-15 minutes, depending on platform)
- Clear cache again...
- Build and Upload addressables (2-3 mins)
- Zip the build and manually upload to itch (3-4 minutes)
Now multiply that by 6 for every build I need to do... Yeah, it SUCKS. What sucks even more is after doing them all, I find something broken in one or more of them, then i have to do that process again and again. As you can see, this workflow is horrible and I wouldn't wish it on my worst enemy.
So I have a couple choices: CI/CD with Unity cloud (automatically does a build every time I make a code change commit), or use a 3rd party tool that will do all of these builds without my input.
So I tried that Unity cloud thing. Turns out each build takes anywhere from 30-50 minutes. Unity charges 2 cents per minutes, so let's be generous and round down to 60 cents per build. Again times 6 for each build. Ideally, this would continuous (hence CI = continuous integration), so if I make changes every couple of days, it really adds up to be more than the monthly cost of the server. At minimum, I would do a weekly build as usual which would not much extra cost. However, this would take more learning on my part to set it up so the addressables and builds are uploaded automatically as well, which will take some time for me to learn and be patient with (on top of everything else I have to do for the game).
With that on the back burner, I decided to use a 3rd party tool called SuperUnityBuild. It's not the automagic builder that Unity devOps provides, but it significantly cuts down on build time and improves my workflow by automating it. Every time I want to do a build, I can press one button and it does all the builds for me and uploads everything. This takes just under and hour on my PC, but honestly it's not so bad in comparison since I could just step away from the PC or do something else while it works. I still need to integrate the server build process into it, but that shouldn't take too long. This new workflow should make my life easier as well as keeping builds more consistently stable.
On another note: the browser version of the game is not functional again. The A* package is either not working for browser but working for all other builds, or vice-versa. And with the aforementioned previous workflow, was very frustrating to realize and deal with. So I'm waiting for that fix to come in any day now. It's also causing issues from upgrading and downgrading constantly, and making me manually reimport the package so it compiles correctly.
Another frustration is Unity
(big surprise, I know). The Addressables package has had this bug in it for MONTHS where I need to keep clearing the cache manually. When doing a server build, it would crash unless I manually switch to the server platform and clear it. So who knows how long that will take. They said the end of January, but here we are, still unfixed. Other than that, as mentioned before, not clearing the cache would add an extra few minutes to each build (if it even completes at all) because it gets stuck in a loop or something. Any month now it should be fixed and my workflow can be greatly improved once again.