+1 to everything @RandolfKlemola and @unity_Ctri have said!
I wanted to add to this to acknowledge this sort of use case is something we are actively working on and we are working on improving the developer experience and integrations between products like Unity Cloud Save and Unity Analytics.
I really appreciate this requests as we have been discussing aggregated data, which is something Unity Analytics supports, but Unity Cloud Save does not, and how we can help developers best solve for use cases that might involve one or both.
As it stands today, in some cases Cloud Save Queries will be the best approach and in some cases it will Analytics, possibly depending on if it’s real time / player scale for game mechanics or not.
Regarding Leaderboards, a common approach, depending on the use case, is to use Leaderboards Metadata, if you just wanted to be able to display this information in-game.
We recently updated the Leaderboards documentation to improve the examples for Metadata:
[Serializable]
public class ScoreMetadata
{
public string levelName;
public int timeTaken;
}
public async void AddScoreWithMetadata(string leaderboardId, int score)
{
var scoreMetadata = new ScoreMetadata { levelName = "LEVEL_01", timeTaken = 120 };
var playerEntry = await LeaderboardsService.Instance
.AddPlayerScoreAsync(
leaderboardId,
score,
new AddPlayerScoreOptions { Metadata = scoreMetadata }
);
Debug.Log(JsonConvert.SerializeObject(playerEntry));
}
As things stand today, you would still need to send the Metadata data to Analytics to do analysis afterwards though.
I don’t think we’ve explored also automatically sending Leaderboards Metadata to Analytics - for example as a configuration option on a Leaderboard - I’ve only had conversations around doing this with Cloud Save specifically but I would be very open to us exploring Leaderboards + Analytics integrations if thats a common use case (please let us know if you are a developer interested in that!).
Related to this, we are also looking at surfacing data from Cloud Save in the Data Explorer, so it can be used for queries. I would be similarly interested to hear if using Leaderboards data would also be something developers want to use.
Again - as folks were saying above - it’s all possible today, but you would currently need to explicitly send that data to Unity Analytics, but I’m very interested in doing this automatically or at least making it possible through configuration rathe than needing code.
Best regards,
Iain