Publishing a game made in Unity to the Play Store
There is a tutorial on how to publish a game made in Unity to the Play Store on Unity Learn. Here's how it went.
As instructed, I installed the Android module to Unity, then switched my project's platform to Android.
Then I clicked on "Player settings", and in the Android tab, I had the option to set up the store keys.
It turns out I already had a keystore ready, so I tried to reuse that. However the file picker wouldn't allow me to select my jks file.
It turns out that even though for Android the keystore extension is jks by default, Unity expects a file with extension keystore (see post and here). Those answers date back from 2017. I'm amazed they still haven't fixed this to have a better default.
Once done, I fixed the package name, then clicked Build.
This time, thanks to the keystore, it generated 2 apks, a debug version and a release one.
So I went over to the Play Store and started filling out questionnaires. When it asked me for assets (icon, graphic, screenshots), I used the resources from my old post (http://blog.wafrat.com/beginning-android-day-1/#publishinganapp).
Then I uploaded the APK. The Play Store threw an error, telling me it required a 64 bit build. How do I do that in Unity?
Some posts said you should uncheck x86, but that option doesn't appear in my window. Some say you should check ARM64, but it was grayed out. It turns out, you have to change the scripting backend from Mono to IL2CPP (see post) before you can enable ARM64. Yet another weird default setting!
Also I enabled making a bundle instead of an APK, since that's the preferred way to upload apps. This way, the Play Store can send the right build to each device.
Upon reuploading, the Play Store said that the build version had already been used up. So I incremented the build version and built it again.
And that did it.
There are lots of refinements I could do, like setting the App icons within Unity. I'll tackle those later.