public async void QueryPlayerData()
{
var query = new Query(
// The first argument to Query is a list of one or more filters, all must evaluate to true for a result to be included
new List<FieldFilter>
{
new FieldFilter("indexedKeyName", "value", FieldFilter.OpOptions.EQ, true),
new FieldFilter("anotherIndexedKeyName", "otherValue", FieldFilter.OpOptions.NE, true),
},
// The second (optional) argument is a list of keys you want to be included with their values in the response
// This may include keys which are not part of the index, and does not need to include the index keys
// If you don't specify any, you will still get back a list of IDs for Players that matched the query
new HashSet<string>
{
"somePublicKey1",
"somePublicKey2"
}
);
var results = await CloudSaveService.Instance.Data.Player.QueryAsync(query);
Debug.Log($"Number of results from query: {results.Count}");
results.ForEach(r =>
{
Debug.Log($"Player ID: {r.Id}");
r.Data.ForEach(d => Debug.Log($"Key: {d.Key}, Value: {d.Value.GetAsString()}"));
});
}