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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Can the User Report screenshots be compressed?

Discussion in 'Unity Cloud Diagnostics' started by Holy-Manfred, May 18, 2020.

  1. Holy-Manfred

    Holy-Manfred

    Joined:
    Nov 30, 2013
    Posts:
    15
    Screenshots for User Reports are uploaded as a rather large .png. A 1920x1080 screenshot can easily take up 3MB. Larger screenshots take longer to upload and use up space that counts towards the daily reporting size limit.
    Is there any way to compress the screenshots and upload them as a smaller .jpg instead of a png? I'd like to minimize the time it takes to upload a report on slower connections.
     
  2. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Holy-Manfred, you can't change to other file types, but you can adjust the size of the PNG that's uploaded. In the TakeScreenshot method, you can pass in the size you'd like to use for your reports:

    public void TakeScreenshot(int maximumWidth, int maximumHeight, Action<UserReportScreenshot> callback)
     
  3. Holy-Manfred

    Holy-Manfred

    Joined:
    Nov 30, 2013
    Posts:
    15
    Yes, I am already doing that and limiting screenshots to 1280x720, but obviously I cannot go much lower without losing the ability to see anything relevant on the screenshots.
     
  4. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    I totally understand the risk of going too low of a resolution. I will pass this feature request on to the team.
     
  5. MigrantP

    MigrantP

    Joined:
    Jun 24, 2013
    Posts:
    116
    We've used the following workaround: In UnityUserReportingPlatform.cs, change line 364 to use EncodeToJPG() instead of EncodeToPNG(). Still works fine in the back end and uses way less data.
     
  6. Holy-Manfred

    Holy-Manfred

    Joined:
    Nov 30, 2013
    Posts:
    15
    Thank you, this works perfectly!
    I just wonder why this isn't the default or why there is no setting to select it? Such a waste of space and bandwidth.
    Then again, the last package update was over a year ago and I guess they just abandoned it.
     
  7. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    @ryanc-unity It's actually a valid question from Holy-Manfred: is user reporting still in active development and when yes, can we expect an update still happening this year?
     
  8. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @MardukCorp, you're correct that @Holy-Manfred's question is valid. Cloud Diagnostics is not currently under active development at this time. However, we are still invested in supporting this space and are currently evaluating how to best move forward.