question

Talha avatar image
Talha asked

Using single variable increment for every user. unity3d

Hi. How to implement one single variable updated by every player?

e.g variable timesplayed=0; at start then whever one player plays a session the variable increments. And then i want to show that variable on top of main screen. this is just an example.

how would i do that?

unity3dCloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

So the idea here is that you want to update a single piece of data from all users - potentially millions of users. That's not something we support, in the legacy data and statistics models. The issue here is that while we can support millions of players updating their own distinct values at a time, trying to update a single value across a large number of players is going to result in a "logjam" effect in the data table, resulting in a serious performance degradation (which would in turn get your title throttled). What we would recommend for now is that you use a Redis Int or similar for aggregating statistic data across all players. We are working on an update to our statistics service which we'll be making available later this year, which will have more options for having many players updating a single statistic.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.