Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    12
    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

    Joined:
    May 2, 2017
    Posts:
    14,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:
    12
    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

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

    bmoodyP3

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

    JeffDUnity3D

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

    bmoodyP3

    Joined:
    Jul 23, 2019
    Posts:
    12
    I am trying to just do regular custom events.So the event tracker is broken?
     
  8. bmoodyP3

    bmoodyP3

    Joined:
    Jul 23, 2019
    Posts:
    12
    I tried to use the Data Privacy Plugin Button and I am now getting the following error:
    upload_2019-10-29_17-47-21.png
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please open separate threads for new issues. You want to resolve one at a time.
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    It's not broken, it's now part of the Unity engine namespace.