The Simple view displays the data collected within the System Used Memory Profiler counter Placed in code with the ProfilerCounter API to track metrics, such as the number of enemies spawned in your game. The Profiler module displays how much memory Unity reserves, and how much memory Unity used at the time of the Profiler capture. Unity sets some memory pools aside for allocations to avoid asking the operating system for memory too often. The Simple view with some Profiler data loaded The Total value is based on the System Used Memory Profiler counter, which indicates how much memory the operating system (OS) reports as being in use by your application. It breaks down the total memory that your application uses into a few major categories. The Simple view displays an overview of how Unity uses memory in real-time on a per-frame basis. To change the view, select it from the dropdown in the top left of the module details pane. Detailed: Captures a memory snapshot which contains more details on the memory that native objects used, including native references to them, and Unity’s different subsystems.Simple: Displays a high level overview of the memory statistics per frame.There are two views available in the module details pane, located at the bottom of the Profiler window:
The amount of memory allocated per frame on the GC heap. The amount of memory the GC heap has used. The number of native object instances in your application. More info See in Glossary instances in your application. The number of Material An asset that defines how a surface should be rendered. How much memory the Meshes in your application have used. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. Unity supports triangulated or Quadrangulated polygon meshes. Meshes make up a large part of your 3D worlds. Mesh The main graphics primitive of Unity. More info See in Glossary in your application have used. Textures are often applied to the surface of a mesh to give it visual detail. How much memory the Textures An image used when rendering a GameObject, Sprite, or UI element. The total memory your application has used. You can also click a category’s colored legend to toggle its display. The Memory Profiler module is divided into categories that display detailed information on where your application spends memory. For more information, see the documentation on Profiling your application. For more precise numbers and memory usage for your application, you should profile your application on the target device and operating system you intend it to run on. To remind you of this, a warning displays at the top of the Memory Profiler module details pane whenever you have the Profiler target set to Play Mode or Editor. This is because the Unity Editor uses specific objects that take up memory, and the Editor window itself uses extra memory.Īlso, because Unity can’t cleanly separate the memory that the Profiler itself takes up from the Play mode’s memory, memory that the Profiler uses is displayed in the Profiler window. When you profile your application in the Editor, rather than building and profiling your application on a target device, the profiling data in the Memory Profiler module is larger than when you run your application on its release platform. You can also see the number of GC allocations per Profiler frame. You can use the memory module to see information like the number of loaded objects, and the memory that they take in total per category. The Memory Profiler module visualizes counters that represent the total allocated memory in your application. For more information on the Memory profiler package, see the Memory Profiler documentation. This page covers information on the built-in Memory Profiler module. You can store and compare snapshots to find memory leaks, or see the memory layout to find memory fragmentation issues. It adds an additional Memory Profiler window to the Unity Editor, which you can then use to analyze memory usage in your application in even more detail.
Memory Profiler package: A Unity package that you can add to your project.
More info See in Glossary module: A built-in Profiler module that gives you basic information on where your application uses memory. For example, it can report the percentage of time spent rendering, animating, or in your game logic. It shows how much time is spent in the various areas of your game.