Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Allowing multiple Analytics projects in Unity 5.1 and 5.2

Discussion in 'Unity Analytics' started by smithmj5, Aug 18, 2015.

  1. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    139
    I recently upgraded to Unity 5.2, and am now attempting to use the built-in, integrated Unity Analytics.

    Previously I was using Unity 5.0.1f1, and used a separate Unity Analytics package (it was not built-in). In that one, I was able to do the following:

    Code (CSharp):
    1.         if (Application.isEditor)
    2.         {
    3.             UnityAnalytics.StartSDK(UNITY_ANALYTICS_PROJECT_ID_TEST);
    4.         }
    5.         else
    6.         {
    7.             UnityAnalytics.StartSDK(UNITY_ANALYTICS_PROJECT_ID_RELEASE);
    8.         }
    I always set up two projects - one that receives analytics while I'm testing in the editor (because I'm often using debug/cheat keys, breaking things, using weird values, etc.) and another that is used for release builds. With the new integrated analytics, I can no longer initialize Unity Analytics in code, it's done through that new window that was added.

    Is it possible to choose between multiple Unity Analytics projects with the new setup? If not, can that functionality be added?

    Cheers!
     
  2. mpinol

    mpinol

    Unity Technologies

    Joined:
    Jul 29, 2015
    Posts:
    317
    Hi @smithmj5,

    The only way to accomplish this in 5.2 would be to create two separate Unity projects with each having a unique project id in the Analytics Dashboard. Another way around this would be to downgrade to a version that supports Unity Analytics as a plugin, any version below 5.1, where you would be able to use your script. This is a feature that has been requested and is gaining support. You can vote for it to be added as a feature here, http://feedback.unity3d.com/forums/unity/suggestions?utf8=✓&status=0&category=analytics&view=hottest
     
  3. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    139
    Two separate projects would be unpleasant to maintain, especially for something so simple. Thanks for the idea though!

    And downgrading isn't an option for one of my games, since I require some of the fixes in 5.1.

    I voted for the issue, thanks for pointing me to the voting page for it.

    Cheers!
     
    mpinol likes this.