Sign In Register

How can we help you today?

Start a new topic
Answered

Export / import entire class of data

I need to store on the server the whole player info, so that it can be accessed via cloud code or retrived by the client. In that information there are stored all what is needed for match making, and for keeping player's profiles uniquely online.

It is a class that contains subclasses, dictionaries, arrays of dictionaries, as well as standard typed variables and strings.

All the class is already serialized and saved locally on the device, taking around 5KB. I'm working in C# on Unity.


What is the best way to export these information to store them on MongoDB and later retrieve it?


Thank you very much.


Best Answer

Hi Beppi

You can save this information in a collection with a playerId field to link to the player.

You can access the collection by cloud code using the api here.

Thanks Katie



Answer

Hi Beppi

You can save this information in a collection with a playerId field to link to the player.

You can access the collection by cloud code using the api here.

Thanks Katie


Hi - could we get more details on how to do this? I have a similar situation in that I need to store each player's game world such that it can persist between sessions, and is also available to cloud code. I'm having difficulty in finding the client calls that can store and request the data, and I'm not clear on how to access that player's game world data via cloud code.


Thanks!

Please ignore my previous post - I found the answer here: https://support.gamesparks.net/support/discussions/topics/1000068345


Login to post a comment