top of page

Unity optimisation of my first unity game

This is what I get in the current profiler for unity. As you can see, there is a massive performance issue when it comes to the utilisation of the CPU. There is a time of over 20 ms which will cap the fps of the game to around 50 frames per second.

From looking at the profiler I have concluded that the rendering of the objects is what is causing the refresh time to be this high. I will now be looking into the way that the terrain is being rendered. And how detailed the terrain is.

After editing some values and offloading the lighting to the gpu instead of having it on the cpu, as well as reducing the detail and detail distance of the objects in the terrain. I have saved 7ms per frame. This means that the player is now able to get over 60 fps on max settings.

After editing some values and offloading the lighting to the gpu instead of having it on the cpu, as well as reducing the detail and detail distance of the objects in the terrain. I have saved 7ms per frame. This means that the player is now able to get over 60 fps on max settings.

Through further investigation I found that due to the amount of trees and the way they interact with the world, they increased the initialization.playerupdatetime time to 9.01 ms. By making all of the trees static and only allowing the used parts of the tree not to be static, I have managed to reduce the time to nothing.

after all the optimisation this is the end result seen on the unity profiler.

© 2018 by Jonathan Grace 

Proudly created with Wix.com

bottom of page