Updating my old project Spinnacle to Unity 2017.4 LTS from Unity 5.5.0f3 was a lot less painful than other project updates to 5.5.
There is of course lots of other changes I would wish to make now in the techniques we used and some decisions we made but today was just maintaining some of my older projects.
After piecing bits back together and using some of the stuff I learned at Unity, Spinnacle was back up and running on Unity LTS with a steadier framerate on mobile and 20mb smaller. There is still some testing on other devices, and more testing on older iOS devices left to do but it is running nicely, however there was some minor issues.
The only real issue we had was our RectTransforms for all of our generated UI appearing stacked instead of separated like intended. This was due to a change in the way RectTransforms are handled, this now requires a manual update when you modify a transform. Using the Unity function ForceUpdateRectTransforms() will cause it to update properly.
It is possible that these code paths could be update to be more efficient so it doesn’t call this function as often, but currently it has a negligible impact and would have been forcing this internally previously anyway.
BundleVersion changes or strictness by iOS
This is more due to my naivety when we originally made the game, on iOS if the bundleVersion does not follow the format ..* it will cause iOS builds to fail on the LTS version of Unity with various warnings. I used to package up some git information into the bundle version (branch name) this made it easier to track down the buggy build.
I have fixed this and separated it out into its own GitInfo Scriptable Object that is stored in each build that our debug system can hook into to get the specific commit and branch it was built under and display this on our DebugUi. This allows us to keep the bundleVersion in a simple Semantic Versioning format 0.7.1 whilst still keeping extra information available in the builds. This is also automatically update during build time utilizing IPreprocessBuild.
As usual with Unity upgrades the lighting data was outdated, this is fixed by going through each scene and rebuilding lighting or clearing lighting data as required. This can be made easier with a small editor script that goes through your selection and runs bake on the scenes. Much faster than manually opening twenty odd scenes and click Generate Lighting.