- Home /
Unity 2021.2.9f1 Issue with the Application.identifier
Hi, I have upgraded my project from 2020 to 2021 and there is an issue with the Application.identifier override feature (Android). I have ticked the override button and retyped the correct in the Player Settings and it shows as the modified one, but when I query Application.identifier using C#, it still shows as the default one (com. + my actual company name + actual app name), messing up a few things in game. It only happens in the editor. Building to a device shows the correct id. Is there a way to fix that ? Thanks.
Answer by kshubner · Feb 04 at 10:12 AM
I don't have exactly the same issue, but maybe related. I am on 2021.2.10f1, but experienced the same with 2021.2.9f1. I have not installed older versions yet to reproduce the problem.
I have been using Application.identifier using C#, but changing the build settings does not affect the code output anymore (it stays at the old value). I noticed that the old value can be found in Library/ArtifactDB, so I deleted that file and let Unity recreate it. This solved the problem temporarily, as now the Application.identifier is updated to the content of the build settings, but changing the value in build settings again will result in the original problem (no effect on Application.identifier).
I also noticed that this only is the case in Editor, not when building an apk and deploying it to the device (there the Application.identifier seems to be properly set).
Interesting. Not sure this file is available from code, but it could be possible to write an editor script to edit it / recreate it when the Application.identifier is modified or when needed. My main Unity project is used for several games in the same collection and a portal app containing them all so I change the identifier quite often. So that would be great :)
Your answer
Follow this Question
Related Questions
Unity Editor Crash with Terrain Textures 0 Answers
Debug Console doesnt show up 7 Answers
How do I stop the player from gliding while in the air? 1 Answer
editor black screen except camera 0 Answers
UnityEvent Inspector bug at Unity 2020.3 0 Answers