Categories
Coding Games

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.

Categories
Coding

A Quickie on Using Android Studio on Ubuntu

The original post below applies to old versions. For 0.4.x plus, you don’t need to do this. You just need to have a proper Oracle JRE/JDK installed system wide which you can do with this:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-jdk7-installer

With the recent preview release of Android Studio it’s important to know that it won’t work properly on Ubuntu with the OpenJDK that’s available.

Fortunately, it’s easy to get it going.

  1. Download the official Oracle JDK
  2. Unpack it (I put mine in ~/SDK/jdk1.7.0_21/ )
  3. Point your JAVA_HOME to this.
    ~/android-studio/bin$ export JAVA_HOME=~/SDK/jdk1.7.0_21/
  4. Run the android studio startup script.
    ~/android-studio/bin$ ./studio.sh
  5. Make awesome android apps.

Have Fun!

Categories
Coding

Building An API…

I’ve decided it’s important for me to be able to expand my trivia to many different platforms.  Although it’s simple to just make it for facebook and call it a day, I think it’s something that should be more than that.

So, I’m building an api for it.  The game play api (as I’ll call it) will allow me to build other front end applications, which will all effectively operate the same way… It’ll delay the release by a little bit, but it’s something I have to do.

Categories
Randomness

Things To Do This Summer

Here’s an ambitous list:

  1. Learn some Python w/Django
  2. Get myself Railed a bit
  3. Figure out PostgreSQL
  4. Write an iPhone/iPod Touch App
  5. Write an Android App
  6. Finish the Zend Framework version of pileofcrap.org
  7. Make sillysounds.net not suck
  8. Do a top-secret startup.
  9. Do another top-secret startup.
  10. See if I can get this Gravis MouseStickII working.