The project in question does not use analytics, let alone legacy analytics. That means no analytics packages are installed.
The project was just upgraded from Unity 2021 to 2022 and the legacy analytics flag (m_Enabled) keeps getting enabled (see GitHub screenshot) whenever project settings are updated.
First time this happened I even received an e-mail from Unity saying they had detected legacy Unity analytics being enabled and that it’s now retired!
I’ve updated three different projects now (to 2022.LTS) and every single one of them is displaying this behaviour.
Both the Analytics & Legacy Analytics packages are uninstalled and\or disabled. Yet every time I open the project, the flag is set to 1 (i.e., enabled) and I have to undo the change in GitHub.
I’m on Unity 6000.0.56f1 and this is still an issue.
Each and every time the project and\or settings are saved, this flag is reverted to enabled (that is, a value of 1) and I have to discard it in source control.
I have no Analytics packages installed, including the built-in Unity Analytics.
Is anyone from Unity able to help with this please?
Thanks for reaching out! Are you using In-App Purchasing in your project, by any chance? Legacy Analytics/Analytics used to be a dependency in the IAP package, and it was not decoupled until version 4.10. You can read about that Here.
Yes the project is using Unity IAP (specifically version 4.12.2) so it’s using the version that’s decoupled from Analytics.
There are no Analytics packages installed and the built-in Unity Analytics package is disabled in the package manager.
This issue occurs on three different projects. All these projects had Analytics enabled at some point, then subsequently uninstalled\disabled.
I raised a ticket about this a while back, but they couldn’t reproduce it and just closed it down.
Each and every time the project is saved in the editor (or auto saved on close) then the enabled flag changes to 1 and needs to be discarded in source control.
Are there any editor logs (by default or that can be enabled) that I can activate to try and help you debug the issue?
Okay, understood! Let me see if I can reproduce it on my end. Just to get the steps right we have:
Unity version 6000.0.56f1
IAP Version 4.12.2.
Saving setting reverts.
Anything else, specific?
On the logging side that might help narrow this down. Unity always writes an Editor.log file. If you reproduce the issue (save → flag flips), then close Unity and check the tail end of that log, you might see entries mentioning UnityConnectSettings, or AnalyticsSettings, or something like that. You can always send me the logs in a private message as well.
I will speak with the Engine team and see if we can iron out if that was it, and provide further information to you as soon as I know more. Thanks for digging into it that’s super helpful! Depending on what is said I will also test it on my end, but for not, I already have something to go with.
I realized you added Analytics and IAP for the 2021 version. Which version would that have been?
You had previously mentioned that “There are no Analytics packages installed and the built-in Unity Analytics package is disabled in the package manager.”, but I’m assuming that this was to highlight that even removing Analytics would still cause the issue?
Sorry, it was so long ago I can’t really answer that.
That said, for Analytics & Purchasing I always updated them promptly when new versions were released (during the development phase) so I would pick one that existed when 2021 went into LTS.
Whilst the Purchasing package is now 4.12.2, it would have definitely used 4.10.0 (or earlier during the 2021 & 2022 phases)
Yes, for exactly that reason.
Not only is the Unity Analytics package uninstalled, but built-in Analytics are also disabled (see attached image)
ProjectSettings → No content changes (suspect maybe file date\time was changed, but not content?)
I appreciate in the grand scheme of things, these are not critical issues. But for those using source control, it’s really annoying and requires constant discarding of changes.
The extra work you’re doing is much appreciated. To be honest, I haven’t used Source Control myself, but for this test I will include just to be able to see the same results as you. Is there anything specific you think might be worth knowing to mimic your usage (for this test, anyways)?
This affects three of my projects, which had the following in common…
All three had analytics enabled in 2017-2021 versions of Unity
All three had their Unity version updated (across one or more major versions)
All three had analytics removed
As mentioned in my original post, the issue was first noticed when updating to 2022.
I’m willing to bet the issue is something to-do with the above. That said, I’m surprised few\any others seem to be experiencing this (so please speak up if you are)
Just ask if you have any further questions, I’ll try and help where possible.
Alright, so I’ve definitely reproduced your issue. The flag is re-enabled whenever I change a project setting after a reboot. I also need to have the In-App Purchasing flag enabled as well.
Yes, for sure. Most won’t notice this, but anyone using source control & IAP/Analytics may. Chances are they haven’t because they just accepted this setting once and never looked back. Out of curiosity, is it possible to leave it enabled, or is there some other reason you want to have this disabled permanently (as a workaround, for now).
Thanks, that’s excellent news. At-least I know I’m not going mad now
The reason for wanting this disabled is that I’ve no idea what effect it might have on device builds, whether that’s now or in the future.
I’m also making the assumption (rightly or wrongly) that even though the flag is disabled in the source control file, there is a possibility that it could be silently enabled in the build pipeline process.
Apple in particular is very strict with this sort of thing. Given that the app listing states zero analytics, I want to make sure that it’s fully disabled and I’m true to my word.