Memory Profiler window reference
The Memory Profiler package operates in its own window in the Unity Editor.
To open the Memory Profiler window, go to Window > Analysis and select Memory Profiler.
The Memory Profiler window has the following panels:
The Memory Profiler window
- Snapshots panel (A): Contains all the memory snapshots in your project and allows you to compare snapshots.
- Main panel(B): Displays in-depth data about memory in a snapshot.
- References panel(C): Displays information about references to and from a selected object.
- Selection Details panel (D): Displays detailed information about a selected object.
Memory Profiler toolbar
You can use the toolbar at the top of the window to perform various actions. The control bar contains the following items:
Control | Function |
---|---|
Toggle Snapshots panel | Expand or hide the Snapshots panel. |
Import | Load a memory snapshot from anywhere on your disk into the Memory captures folder specified in the Memory Profiler Preferences so that it gets listed in the Snapshots panel. |
Capture | Select this button to take a memory snapshot. This operation might take a few seconds, depending on the size of your application. Once the Memory Profiler has captured the snapshot, it appears in the Snapshots component. Select the dropdown menu to choose which flags the Memory Profiler captures:
Additionally, you can choose to include some additonal settings:
|
Attach to Player | Use the dropdown menu to choose a target to take a snapshot of. You can choose the Editor itself, any Player that's running, or manually enter the IP address of the device you want to take a memory snapshot on. For more information, refer to Profiling your application. |
Note
There is no clean separation between the memory used for Play mode and memory used for the Editor that runs in Play mode, so Editor snapshots always contain more memory and have a different memory usage behavior than a Player would, even if it runs on the same platform as the Editor. Taking Editor snapshots is therefore only recommended for faster iteration flows while optimizing, whereas the final result of optimization work should always be checked by analyzing the usage of a Player build.