Memory Profiler - chanhpomme/ugp-wiki-temp GitHub Wiki

Memory Profiler

The memory profiler is a Unity tool to check the current ram used by Unity App at a specific moment. It can be used with the Unity Editor, Android phone, iOS phone (and more). The window can be open following this path: Unity bar -> Windows -> Analysis -> Memory Profiler.

How to use

First at all, it's important to select the platform targeted: Editor / iOS / Android (like the Unity profiler window, in the top left corner). Once in the application, the goal is to "take a snapshot" of the memory with the capture button. After some seconds the capture will be available in the row on the left of the window. Just open the capture to see the state of the ram at this moment.

Important information: About the iOS and Android build. Select Development build in the project settings (and autoconnect Profiler ?)
Memory on your hard disk: be careful, each snapshot take a lot on your hard disk (200Mo - 600Mo). Don't forget to clean the folder when it's done.

Check memory leak in a game

Follow the instructions below:

  • Launch the game a first time
  • Unload it
  • Take a snapshot of the memory
  • Reload the game
  • Unload it again
  • Take another snapshot
  • Compare them

In a game without memory leaks, there will be only one difference between the two snapshots. The Texture2D size will be larger by 3.9Mo. But it is logical because Unity takes a screenshot of the game when you take a snapshot.

⚠️ **GitHub.com Fallback** ⚠️