Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Analytics Event Track script causing problems.

Discussion in 'Unity Analytics' started by bmoodyP3, Aug 6, 2019.

  1. bmoodyP3

    bmoodyP3

    Joined:
    Jul 23, 2019
    Posts:
    7
    Context:

    Our company is trying to build a music application in Unity and recently put some Analytics Event Tracker scripts into our project.

    Expected Behavior:

    When we build out the project, we should not get any errors.

    Actual Behavior:

    When we build, our project breaks and we get the following errors.

    Is there something wrong with the way we are implementing the Analytics Event Tracker below?

    upload_2019-8-5_17-48-36.png

    The file 'C:/Users/gilli/Desktop/HubBuilds/8519_57/ControlRoomRift_Data/level0' is corrupted! Remove it and launch unity again!
    [Position out of bounds!]

    (Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializationCaching/CachedReader.cpp Line: 214)

    The file 'C:/Users/gilli/Desktop/HubBuilds/8519_57/ControlRoomRift_Data/level0' is corrupted! Remove it and launch unity again!
    [Position out of bounds!]

    (Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializationCaching/CachedReader.cpp Line: 220)

    A scripted object (probably UnityEngine.Analytics.AnalyticsEventTracker?) has a different serialization layout when loading. (Read 144 bytes but expected 408 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    (Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializedFile.cpp Line: 2001)


    Implementation:
    upload_2019-8-5_17-53-16.png
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,446
    You don't need the tracker component in recent versions of Unity (at least 2018 and above), the Analytics namespace built into the engine.
     
  3. bmoodyP3

    bmoodyP3

    Joined:
    Jul 23, 2019
    Posts:
    7
    In that case, could you point me to the correct documentation in regards to working with Unity analytics without the event tracker? The documentation that I have seen so far has suggested that the tracker component is needed.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,446
  5. bmoodyP3

    bmoodyP3

    Joined:
    Jul 23, 2019
    Posts:
    7
    So does the TrackerComponent no longer work in versions of Unity beyond 2018?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,446
    I haven't checked, but it's not necessary. What are you trying to accomplish?