Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official Memory Profiler 0.6 Released

Discussion in 'Profiler Previews' started by markharkness, Mar 11, 2022.

  1. markharkness


    Unity Technologies

    Nov 2, 2010
    We have just shipped a new iteration of the memory profiler package. Detailed below is everything that has been added.

    Scene Roots And Asset bundles
    We have added some information to the snapshot that allows us to be able to clearly identify what objects are the root game objects in scenes and what scenes they belong to. The reason behind this is mainly to facilitate some future work that will allow us to more easily identify the paths from “Root” objects to the current selection, thus allowing you to more easily find the reason something is still in memory. This information will go live in 2022.2. If you take some snapshots from that version you will see that scene roots are marked as Scene Roots in the “Referenced By” and “References To” section.

    References To

    We have added a “References To” section to the details panel that will allow you to see what your objects have references to. For example Let's say you have a MonoBehaviour that has two GameObject fields on it that are both assigned. If you track down the MonoBehaviour instance in the memory profiler and select it the “References To” section will show you exactly what the objects that those fields are referencing.

    This can also be coupled with the new AssetBundle information to see exactly what was loaded from the asset bundle.

    What is next

    Paths from root will be next up in the references section and will allow you to really easily see the paths from “Root” objects to your selection and help you to see why things are in memory. We really wanted this to make it for this release but there were some issues that could have made things more confusing for our users. We have opted to instead take a little more time to make sure that it makes sense, is easy to understand and does not lead to any confusion.

    Memory Breakdowns
    Unity Objects
    The 'Unity Objects' view shows a breakdown of memory contributing to all Unity Objects. The goal is to enable you to more easily understand the total memory impact of the assets and objects in your project by showing you their total, native, and managed sizes in one place. Unity Objects are grouped by their types, such as Texture2D, Material, and Mesh. Use the 'Search By Name' functionality to filter the view to specific objects. Use the 'Flatten Hierarchy' functionality to remove the Type groupings.

    Potential Duplicates
    The 'Potential Duplicates' view shows a breakdown of all potential duplicate Unity Objects. Potential duplicates, which are Unity Objects of the same type, name, and size, might represent the same asset loaded multiple times in memory. The goal is to help you discover these potential duplicated assets more easily.

    All Tracked Memory
    The 'All Tracked Memory' view shows a breakdown of all tracked memory that Unity knows about.

    What is next
    With new simplified views we added now we would like to remove old tables and focus on providing specialized views which are tailored to a particular exploration workflow and allow you to answer specific questions such as “are there any leaked objects?”, “which textures in memory are not read-only?” etc.

    We would also like to remove the Fragmentation view to refine the information that is present there and make it easier to understand.

    As always send us your feedback on what we have done and if you find issues, let us know.
    bulijite, DragonCoder, JesOb and 3 others like this.