This guide introduces ways that you can optimize your Unity programs, especially their GPU usage.

Optimization is the process of taking an application and making it more efficient. For graphical applications, optimization typically means modifying the application to make it faster. For example, a game with a low frame rate might appear jumpy, which gives a bad impression and can make a game difficult to play. You can use optimization to improve the frame rate of a game, making it a better, smoother experience.

The optimization process is iterative. To find and remove performance problems, perform the following steps:

  1. Take measurements of your application with a profiler.
    The profiler analyzes the measurements so that you can isolate and identify the source of any performance problem.
  2. Locate the bottleneck by analyzing the profiler data.
  3. Determine the relevant optimization to apply.
  4. Verify that the optimization works.
  5. If the performance is still not acceptable, return to step 1 and repeat the process.

Here is a brief example of the optimization process:

You have a game that does not have the performance you require. You can use a profiler to take measurements of your application. Profiling shows that the problem with the game is that it renders too many vertices, so you reduce the number of vertices in your meshes. Execute the game again to ensure that the optimization worked.

If the game is not performing as expected after you have completed the optimization process, you can restart the process by profiling the application again. This enables you to find out what else is causing problems.

Note: This guide was last reviewed with Unity 2019.3