Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to get content statistics?

Discussion in 'Unity User-Generated Content' started by Battlenet, Nov 1, 2023.

  1. Battlenet

    Battlenet

    Joined:
    Feb 29, 2020
    Posts:
    3
    Hi, how to get content statistics? When i do content.Statistics.DownloadsCount or trying to get another stat like rating, i get null reference exception
     
  2. Battlenet

    Battlenet

    Joined:
    Feb 29, 2020
    Posts:
    3
    does anybody knows?
     
  3. PauloxWg

    PauloxWg

    Joined:
    Aug 1, 2020
    Posts:
    4
    Does anybody knows? x2
     
  4. DVelt

    DVelt

    Joined:
    Feb 11, 2023
    Posts:
    20
    Have you downloaded the statistics with the content when you got the content? Because there is a parameter in GetContentArgs that allows you to specify whether or not to include statistics with the content.
     
  5. PauloxWg

    PauloxWg

    Joined:
    Aug 1, 2020
    Posts:
    4
    I am getting a whole page of contents at once, so I have to use GetContentsArgs() which for some reason does not have the includeContents property.
     
  6. DVelt

    DVelt

    Joined:
    Feb 11, 2023
    Posts:
    20
    Yeah, the feature to do this on GetContents doesn't exist, so until they add that you're going to have to GetContent every result from GetContents each time you want the statistics.
    I know it's dumb as hell and consumes extra bandwidth, but it is what it is and there's no other way that I know of.
     
  7. PauloxWg

    PauloxWg

    Joined:
    Aug 1, 2020
    Posts:
    4
    Thank you for the response, I hope they add property soon.
     
  8. DVelt

    DVelt

    Joined:
    Feb 11, 2023
    Posts:
    20
    Yeah I hope so too