Search Unity

Analytics makes quit slow

Discussion in 'Unity Analytics' started by whl2006, Sep 10, 2019.

  1. whl2006

    whl2006

    Joined:
    Nov 14, 2018
    Posts:
    2
    After upgrading to Unity 2018.3, we noticed that our game quits significantly slowly. Recently we found this is caused by Unity sending some data to `cdp.cloud.unity3d.com` after game exiting.

    Now only if we disable HW Statistics and all services (include Cloud Diagnostics) can make our game quit as Unity 2018.2's build do. But we do need some services to work and what we want is just not send data when game exiting.

    We were wondering if there's some options to forbid analytics when quit or can we disable the analytics in runtime. In fact, we've used the code blow, but it seems not work.

    Analytics.enabled = false;
    Analytics.deviceStatsEnabled = false;
    PerformanceReporting.enabled = false;
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,165
    Can you elaborate, exiting on what platform? Do you mean the Unity Editor is slow to quit, or a game, perhaps on an Android device?
     
  3. whl2006

    whl2006

    Joined:
    Nov 14, 2018
    Posts:
    2
    It's a windows standalone build.
    I created an empty project then exported the exe file and open it then exit. Here's what fiddle captured.

    It quits about 2 seconds after I click close button or Alt-F4.
     
    Last edited: Sep 11, 2019
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,165
    Got it, thanks for reporting. I will let the Analytics team know. If they can identify the issue, perhaps we can get an update into a release later this year.