Sign In Register

How can we help you today?

Start a new topic
Answered

Admin client to be updated on every players data

Hi there


My game is made in Unity.


I would like 20 registered players to constantly upload how many apples, pears and banana they have (for sake of argument).


So far this has been fairly easy to do by following the Cloud Code tutorial under getting started 


https://docs.gamesparks.com/getting-started/using-cloud-code/unity-cloud-code.html


However, I would now like an 'admin' player in a separate Unity game to be constantly updated on the status of every single players apple, pear and banana collection.


Does anyone have a good suggested approach for this?


Thanks


Jim


Best Answer

Hey Jim,


A decent approach would be to create an extra field for admin in the players script data by using the setScriptData() method. Once this is done you can run a check on the client and alter the Client appropriately.  


I wouldn't recommend constant updates as this may cause some instability in your game, but you can have this information regarding apples and bananas requested to your client during set intervals. Mind if I ask what kind of game you are making??


Does this answer your question,

- Tony     

1 Comment

Answer

Hey Jim,


A decent approach would be to create an extra field for admin in the players script data by using the setScriptData() method. Once this is done you can run a check on the client and alter the Client appropriately.  


I wouldn't recommend constant updates as this may cause some instability in your game, but you can have this information regarding apples and bananas requested to your client during set intervals. Mind if I ask what kind of game you are making??


Does this answer your question,

- Tony     

Login to post a comment