Search Unity

Can't use dynamic values in Analytics Event Tracker, Editor exception

Discussion in 'Unity Analytics' started by Braza, Dec 29, 2019.

  1. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    136
    Unity 2019.2.17
    I tried different target scene objects to drive dynamic values, they do have public int fields. But still fields are not discovered, instead exceptions are logged.

    upload_2019-12-29_9-13-28.png
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What version of the Analytics package are you using?
     
    Braza likes this.
  3. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    136
    it is 3.3.2 and it said no other versions are available. Although after is returned to package manager again, 2 more versions appeared. I'll tried 3.3.4 with no luck yet. Still an exception.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it, we are checking
     
  5. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    136
    Sorry for autocompletion typos in previous reply..
    I wanted to add that I've submitted a bug report through unity too, maybe the whole project could be useful to reproduce the problem.
    Thanks!
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No, a project is not necessary if it reproduces for you every time, even on a new project.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I tested on Unity 2018.4.6f1 with Analytics Library 3.2.0 without issue. In a new project, I dropped a UI button and an empty game object. For the button, I added the Analytics Tracker, and added a dynamic parameter based on the game object. Can you test on a new project similarly? How did you add the component in Unity 2019 using Analytics Library 3.3.2? The tracker component is not available in that library version (a bug). So I'm assuming you upgraded this project from a previous version?
     
  8. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    136
    Thanks for trying that!
    I started from scratch, 2019.3.17f and Analytics Library was there already with version 3.3.2. I clicked to update to 3.3.4 as it is mentioned as "verified". I could use the Analytics Event Tracker Component at least with 3.3.4, didn't try 3.3.2 on a new project. I dropped a camera as a target for dynamic values and it worked! Transform and Camera components were exposed in the Field menu.
    upload_2020-1-4_12-36-42.png

    Then I switched to my problem project and upgraded Analytics Library version - same problem. But then I dropped my main camera onto the target instead of my GameController object and Tracker found components and their fields with no problem.
    My GameController object has few components on it, so I tried removing them one by one and it was my GameController component guilty for some reason. This component is a mess, I'll try to conduct experiments to identify what in it breaks Analytics Event Tracker fields explorer. So far I tried removing nested classes with no luck.

    Any suggestions? If none, I think I could create a workaround with some proxy object now, but still curious about the reason of failure.
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We would need specific steps to reproduce, unfortunately I don't have any suggestions. I don't see the Event Tracker available in 3.3.4, can you share a screenshot of it available when you add a Component in the inspector? You should see Analytics/Event Tracker in the list.
     
  10. AdminXRBASE

    AdminXRBASE

    Joined:
    May 19, 2020
    Posts:
    18
    I have this exact issue using Analytics in 3.3.5 in Unity 2019.4.3. We will be upgrading to 2020.3 next week probably, hope it will be resolved then...

    Specific steps:

    - Add the Analytics Event Tracker component to a Game Object
    - Give it a name, add a parameter set it as dynamic
    - Add an object to the parameter, try to change the NoField to add a dynamic value.
    > Some objects will work, but most of them do not! I can't put my finger on what will and what will not work.
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You will want to use Scripted Custom Events, we haven't updated the tracker in some time and no immediate plans https://docs.unity3d.com/ScriptReference/Analytics.Analytics.CustomEvent.html
     
  12. AdminXRBASE

    AdminXRBASE

    Joined:
    May 19, 2020
    Posts:
    18
    Please add this to the manual, saves people a lot of time and frustrations :D