Things were working fine in Unity 2018.2. I upgraded to Unity 2018.4, which automatically upgraded my TMP package to v1.3. IL2CPP. Building using cloud build, 2018.4.1f1 (same as editor), and gradle (everything default, I do not customize gradle at all).
Right now, things work fine in the editor and on iOS. But on Android, I get this error logged for every TMP element trying to render:
.
Unity : NullReferenceException: Object reference not set to an instance of an object.
at TMPro.TMP_Settings.get_defaultStyleSheet () [0x00000] in <00000000000000000000000000000000>:0
at TMPro.TMP_StyleSheet.get_instance () [0x00000] in <00000000000000000000000000000000>:0
at TMPro.TextMeshProUGUI.Awake () [0x00000] in <00000000000000000000000000000000>:0
(Filename: currently not available on il2cpp Line: -1)
.
I have tried uninstalling and reinstalling TMP via the package manager. I have imported TMP essential assets and I have run the GUID remapper tool (which did not find anything to update). I have opened TMP settings and checked that the default style sheet links to a file that exists (Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset). I have temporarily modified (change something, save project, revert change, save project) this file and many other TMP files to force TMP to regenerate them - this did cause many unexpected changes in the git diff, but it didn’t help the result on device. None of the above has helped.
.
Anyone? I’m going on several weeks now without my Android version being broken.