Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity Analytics Service activated, but not working until turned off and on again

Discussion in 'Unity Analytics' started by HerrPascal, Jul 8, 2020.

  1. HerrPascal

    HerrPascal

    Joined:
    Apr 29, 2020
    Posts:
    2
    Hello there,
    I've got a problem with the Unity Analytics service. Despite being activated as a service, the code surrounded by #if UNITY_ANALYTICS does not compile. (See screenshots below)




    Now when I turn Analytics off and on again - it does compile. (toggle off / toggle on)



    I can't figure out what's the problem here and it's really problematic for automated jenkins/buildserver builds, because there is no manual analytics service off and on option. Unity Version for this example is 2018.2.20f1, but I was able to reproduce this on some other 2018.x.x Unity versions.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,608
    Your work around is correct. Once you toggle the service as you suggest and Save the project, Analytics should stay enabled. Specifically the steps are:

    * Make a back up of your project
    * Open the project in Unity
    * Disable Analytics, Save the project, and exit Unity
    * Reopen the project
    * Enable Analytics, and Save the project
    * Done! Analytics should now be properly enabled
     
  3. HerrPascal

    HerrPascal

    Joined:
    Apr 29, 2020
    Posts:
    2
    @JeffDUnity3D Thank you for the confirmation of the problem and that the workaround is valid.
    Now this is still a problem for automated builds on a server, since I copy the repository to the server and then start a silent build in unity. Is there any workaround for this, too?
     
    Last edited: Jul 9, 2020
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,608
    Not that I'm aware of, and I would not expect an update any time soon.
     
unityunity