Search Unity

Unity 5.4 Integration

Discussion in 'Unity Cloud Diagnostics' started by Sir-Thorgeir, Jun 22, 2016.

  1. Sir-Thorgeir

    Sir-Thorgeir

    Joined:
    Jan 17, 2013
    Posts:
    16
    Hi

    I have been using this service a lot with Unity 5.3 on iOS and it has worked pretty well.

    I recently updated Unity 5.4b22 and ran into the following error:

    So I removed the old plugin and turned on the built-in service. But that raised another issue, now I can't call the init function.
    Code (csharp):
    1. CrashReporting.Init(Application.cloudProjectId, "Version x.x.x");
    Is there any way for me to specify the version string in the built in version?
    if not, what does it use as a version number?

    Thanks
    Þorgeir Auðunn
     
  2. ChrisLundquist

    ChrisLundquist

    Unity Technologies

    Joined:
    Mar 2, 2015
    Posts:
    55
    Yeah, you'll have to remove the init code you have there.

    The integration uses:
    ```
    m_Version = GetPlayerSettings().bundleVersion;
    ```

    It looks like http://answers.unity3d.com/questions/394834/set-bundle-version-code-through-editor-script.html
    Gives a decent overview of how to set it.


    My hope was to make CrashReporting single click to use, and have it use reasonable defaults.

    Is there a case where setting the bundleVersion wouldn't work well?

    Hope this helps,
    Chris Lundquist
     
  3. Sir-Thorgeir

    Sir-Thorgeir

    Joined:
    Jan 17, 2013
    Posts:
    16
    Hi @ChrisLundquist

    Thanks for the quick reply!
    I think PlayerSettings.bundleVersion will work fine for Android and iOS but what happens on WebGL?

    I do not see the input for bundleVersion in WebGL player settings.

    Thanks,
    Þorgeir Auðunn Karlsson
     
  4. ChrisLundquist

    ChrisLundquist

    Unity Technologies

    Joined:
    Mar 2, 2015
    Posts:
    55
    I think WebGL will send "" or "1.0".
    Keep in mind that crash reporting isn't the most helpful for WebGL as it is transpiled javascript. Code you wrote in C#, then turned into javascript, then minified to make the download smaller.
    We're thinking about how to make it *more* helpful, but that's the situation at the moment.

    Chris Lundquist
     
  5. fastgamedev

    fastgamedev

    Joined:
    Mar 27, 2014
    Posts:
    79
    Chris,

    Exception reporting is still very useful in WebGL, even without traces. Throwing Exception() with a meaningful message in all the right places will yield tons of useful info.
    But we do need version info in the reports. Without it they truly are useless.

    Thanks,
    Arman.
     
    Sir-Thorgeir likes this.
  6. Sebioff

    Sebioff

    Joined:
    Dec 22, 2013
    Posts:
    218
    The Unity documentation says PlayerSettings.bundleVersion is specific for Android/iOS platforms, so does setting this value work when deploying for any other platform, like PC?
     
  7. coshea

    coshea

    Joined:
    Dec 20, 2012
    Posts:
    319
    Sorry to hijack this thread but related...

    I've upgraded to 5.4, I've deleted the plugins/UnityPerf folder and performance reporting is turned on in the services tab.

    "The type or namespace name `CrashLog' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?"

    So actually we don't need to do CrashReporting.Init() at all now?

    Thanks
     
  8. thomasn_unity

    thomasn_unity

    Unity Technologies

    Joined:
    Jun 21, 2016
    Posts:
    60
    That's correct. If you're using 5.4, you just need to enable Performance Reporting in the Services window.
     
  9. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    985
    @thomasn_unity You should probably put this in the services docs -- the startup guide still shows to use the init() and it causes weird errors like above. In April 2017, I still get this issue and had no idea til I found this thread.
     
  10. sup3mien

    sup3mien

    Joined:
    Jun 12, 2017
    Posts:
    1
    Restart?