Using Unity Analytics to Improve Your Game Balance!

Unity Analytics is a great tool provided by unity to account holders to track certain data in order to improve your game. This is a cool method to allow you to see what people are doing in your game that you might not  necessarily be able to see while watching them play your game.

For a play-test we were required to enable unity analytics tracking to an element of our game. First thing is recognising what data you cant necessarily get by watching the game-play that is going to be most useful.

The data we need is the collision information, this is not a standard event that unity already supports, therefore we must set up our own custom events in order to track them. I personally followed along the Unity Manual to understand how to write the analytics code for our game. This information can be found at: Unity – Manual: Custom Events.

The following is the code we used to determine what part of the enemy we ended up hitting. “Body Part Hit” will return the tag of the object that collided with the lance and “Entity Owner” returns whether it was the Enemy or the Player that made the hit.

Analytics.CustomEvent ("WeaponOwner", new Dictionary<string, object>
{ {"Body Part Hit", collision.gameObject.tag},
{ "Entity Owner", ownerEntity.ToString()}

So we get back 2 values when someone has a run, who made the hit and where they hit.


As you can see from this we can derive the fact that the enemy has really good aim vs a human overall. This information would lead us to believe that we need to decrease the enemy’s accuracy in order for the game to be a little more balanced.

For Joust! the statistics we were most interested in was how often the player or enemy  hit the opponents Chest/neck/head. This data can then be viewed on the online charts the following day. Viewing these values as a percentage against each other (graphically a pie chart would be best) allows me to see if the ratio’s add up to a fair number. For example, if the enemy is hitting the players head 70% of the time, and the player hits the enemy head on average 20% of the time, this indicates that there is an issue with the Enemy’s aiming AI. As such, if they were both 70% head shot ratings, this would indicate to use that the head hit box is too big and would need to be changed. Joust has already had this occur with the neck hit box. It seems to be getting hit more often than I intended and now has been slightly reduced in size to correct this.


For further more detailed explanations the following video from Unite Europe 2017 conference I found super insightful about all the things you can achieve with Unity analytics:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: