Setting / Uploading incremental Stat doesn't do anything if Stat is set to hidden

Singe
Contributor

Setting / Uploading incremental Stat doesn't do anything if Stat is set to hidden

Hi there!

I'm working in Unity, trying to implement the Stats & Achievements API inorder to set up an achievement that can be unlocked after doing a certain action 10 times. In order to do so, I've set up an Achievement, and a Stat, and in my code I incrementally call UserStats.SetStat() and UserStats.UploadStat() everytime the action is done, checking each time if we've reached the threshold and then calling SetAchievement() if so.

The issue I'm having is that I can't seem to see the result of incrementing a Stat when it is set to "Hidden" visibility in the Viveport console. I try to get back the value back by calling GetStat() but it returns the value 0. On the other hand, if I set the Stat to Revealed (in the viveport console for the app), I can increment them just fine, and the same call to GetStat() afterwards returns the expected value.

I've followed the outline here: https://developer.viveport.com/documents/sdk/en/api_stats.html as closely as possible in our implementation:

1. I first call the top level Init(), do the license check, and then make the isReady() call.
2. Before updating any achievement or stat, I call DownloadStats(), and then on the callback I first SetStat(), then UploadStat().

Is this intend behavior? Or is there something else I should be doing before setting a value to a hidden stat?

Thanks for your help.
@yakingkuo  @Continent tags added by moderator) 
 
Vive Staff

Re: Setting / Uploading incremental Stat doesn't do anything if Stat is set to hidden

Hi @Singe:

 

Yes, the steps you mentioned below are correct flow to implement the Stat / Achievement APIs. 

But please don't set Stat as hidden first because it is just a hidden mode now and could not get its real value from the getStat() API. 

So, please set the "Revealed" to implement SDK in your content. 

Should you ever need anything, please don't hesitate to contact me.

Thanks.

 

 

Singe
Contributor

Re: Setting / Uploading incremental Stat doesn't do anything if Stat is set to hidden

Thanks @yakingkuo1 ,

 

Does this mean that viveport does not support hidden achievements? Or that I simply can't use hidden achievements while I'm testing in beta mode?