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
C
Customer Support
said
over 7 years ago
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.
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
C
Christian Southgate
said
about 7 years ago
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!
C
Christian Southgate
said
about 7 years ago
Please ignore my previous post - I found the answer here: https://support.gamesparks.net/support/discussions/topics/1000068345
Beppi Menozzi
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.
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
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
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
Christian Southgate
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!
Christian Southgate
Please ignore my previous post - I found the answer here: https://support.gamesparks.net/support/discussions/topics/1000068345
-
Rules regarding tickets and forum posts.
-
Uploading and retrieving an image from Unity to GameSparks
-
Setting up a score based asynchronous challenge
-
Social Friends System
-
How to insert date into a document
-
For complicated client/server stuff, the GamesparksTestUI is really useful
-
How To Login with the Official Google Play Plugin for Unity on Android
-
GameSparks GameObject Singleton (Unity)
-
Creating a player-list for searching and storing player info
See all 44 topics