Search Unity

  1. 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

Analytics Library 3.3.2 does not compile in 2019.1

Discussion in 'Unity Analytics' started by Yozaro, Sep 17, 2019.

  1. Yozaro

    Yozaro

    Joined:
    Jun 28, 2015
    Posts:
    70
    I added Analytics Library 3.3.2 into the project with the Package Manager, but I got these compilation errors:

    Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacyButton.cs(47,17): error CS0103: The name 'RemoteSettings' does not exist in the current context
    Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacy.cs(42,26): error CS0103: The name 'AnalyticsSessionInfo' does not exist in the current context
    Library/PackageCache/com.unity.analytics@3.3.2/DataPrivacy/DataPrivacy.cs(43,29): error CS0103: The name 'AnalyticsSessionInfo' does not exist in the current context

    My Unity version is 2019.1.14f1 and analytics are enabled in the services window.

    I already tried removing the package and adding it again. Also tried clearing the PackageCache folder and restarting Unity.

    Any idea how to fix this?


    EDIT: Also noticed that 3.3.2 is marked as 2019.1 verified only if you do not have it installed. Once you install it, it loses the verified tag and has preview tag instead.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,164
    You might try "Reset packages to default" under the Help menu. Do you have the Data Privacy asset also in your project?
     
  3. Yozaro

    Yozaro

    Joined:
    Jun 28, 2015
    Posts:
    70
    Hi again, sorry for the long delay. I reset all packages to default and added them back one by one. No compiler errors this time. Thanks!

    Any idea what triggers this issue?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,164
    If you could provide specific steps to reproduce, we may be able to determine what triggers it.
     
  5. Yozaro

    Yozaro

    Joined:
    Jun 28, 2015
    Posts:
    70
    I think I have some more information on why it happened. When I searched Package Manager for anything related to analytics, it only showed one package.
    manager.png

    Installing it only added com.unity.modules.unityanalytics into the manifest and resulted in compiler errors. Reseting packages to default, then installing Unity Analytics and reverting all other changes to the manifest, I ended up with two new packages: com.unity.modules.unityanalytics and com.unity.analytics. No compiler errors this time.
    manifest.png

    (The change to Memory Profiler shown in the screenshot is not related to the issue.)
     
  6. unity_NDDJe-IzeRlkjQ

    unity_NDDJe-IzeRlkjQ

    Joined:
    Jan 5, 2019
    Posts:
    1
    you have to log out and re log in into unity, it worked for me
     
unityunity