Upgrading All My Unity Apps

Google and Apple have both had a lot of policy changes in the last little while. Google’s was far less annoying than Apple’s. Both require me to rebuild my Unity games.

Google requires 64bit build support in all App store apps as of August 2019 (with a few exceptions). Most of my older games are exempt until 2021, but since a couple were not, I opted to update them all.

Apple’s implemented some arbitrary policy that they can pull your apps from the store if they’re not updated for some unknown amount of time. One of my games is on the block and will be removed in 30 days. Who knows how many others will follow. Apple has also deemed my perfectly functional 2009 Macbook Pro to be obsolete, so I can no longer even build for iOS on this hardware. A whole different story.

So I’ll update my Android apps.

The Process

The process to upgrade everything to 64bit is a bit of a crap shoot. I didn’t know how long it would take or what I was really in for, so here’s a rough list of what I had to do in Unity:

  1. Update Unity to the latest LTS version.
  2. Open your old projects and let Unity update what it can.
  3. Change the build system to “Gradle” – internal is now deprecated.
  4. Check the “Build App Bundle (Google Play)” if you are uploading to Google
  5. Change your Target API to the Highest Level.
  6. Change your Android build settings to use .NET 4.x since 3.x is deprecated.
  7. Change your Android build tool to use IL2CPP (required for 64bit)
  8. Check off the ARM64 box.
  9. And Build…
Unity Build Settings Dialog
Unity Player Settings for Android

What Really Happened

Everything broke.

If you’re like me, You’ve probably used some extra libraries. I use Text Mesh Pro, Google Ads, Firebase Analytics, and Google Play Game Services in all of my apps. This process required all of them to be updated.

If you use these, in order to cleanly update, you must delete the old versions. The latest Google Play and Google Ads packages from their Git Hub repos install pretty cleanly. The tricky parts were with Firebase and Text Mesh Pro (TMP).

You must import the dotnet4 packages. Once you do that, the dependency resolver should fire up automatically and get any required bits and pieces from the Android SDK.

The original version of Text Mesh Pro wasn’t an official package in Unity. So needless to say, I had to re-do most of my TMP objects. The rest of the code worked fine, but it was a little more time consuming than I would have hoped for.

Other Unity Problems

I ran into a few minor issues with NDK (Native development kit) which is required by Unity to use the IL2CPP compiler. You’ll need to make sure you get the specific version and point Unity to it. At time of writing, Unity requires NDK r16b (r20-something is current). It will send you to a link to download it if it can not find it on your machine.

Final Thoughts

All in all, it was a somewhat bearable process that took a few hours per game. I’ve got the process down, so I’ll be good to go on the rest.

As a bonus prize, I was able to convert to Google Play’s signing management and use App bundles, which greatly reduced the download size of my Android apps.

Maybe this update will increase downloads a bit.

Published by Darryl Clarke

random text goes here, i guess