Skip to main content

Unity App Optimization Suggestions

Screenshot 2023-09-11 at 12.43.03 PM.png

  • Optimize Text with TextMesh Pro instead of default Unity Texts.
  • Remove all unused lifecycle methods like Awake, Start, OnEnable, Update etc.

Screenshot 2023-09-11 at 12.06.41 PM.png

  • Remove all the Raycast Target of all the game objects in which it is not used. For example a text on button doesn't require this. This is turned on by default and continuously check for raycast like in an update function.

Screenshot 2023-09-11 at 12.00.36 PM.png

  • Remove all Debug.Log method calls used in the project. Each call uses certain amount of memory to execute and print the logs.
  • Remove all the warnings in project in Unity Editor.
  • Try to use multiple canvases. If all the UI elements are in a single canvas, one small change results in the refresh rendering of whole canvas.
  • Avoid using Camera.main. Instead cache the main camera once and reuse this. Using Camera.main slows down the game.
  • Use string builder instead of string concatenation.
  • Set gameobjects to static, that will not move in the game.

Screenshot 2023-09-11 at 12.22.03 PM.png

  • Use object pooling
    • Instead of destroying and creating game objects, re-use the objects using object pooling.
  • It is very important to keep your project clean without errors, missing stuff, and unnecessary files.