Search Unity

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

Question More information on memory profiler

Discussion in 'Scripting' started by tonyoakden2, Nov 6, 2023.

  1. tonyoakden2

    tonyoakden2

    Joined:
    Oct 14, 2016
    Posts:
    15
    I'm optimising memory usage and using the new Unity profiling tool. There are some things I don't understand:
    .84GB is untracked memory, that's 25% of my usage. Is there anyway to reduce this? What is likely to be in it an how might I reduce it?

    368 MB is "Other Native Memory" - is there a way to analyze this and what is likely to be in it?

    Graphics I'm fine with. The tools are good for this but it's relatively small at about 300MB


    Any advise or tips are most appreciated as usual :)
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,408
    Hi,
    First off, which Unity and package version are you using? 2022.3 and 1.1 is the recommended combo, 2023.1+ has even more details, especially for untracked. Though for untracked and reserved details you might have to go to the preference for the Memory Profiler to enable them.

    And generally speaking, all the details are on the All Of Memory page.

    Also, the package's manual pages
    (for versions pre-1.0)
    as well as the selection details (1.0+) for the untracked element contain version appropriate details on what could be included in the untracked amount.
     
    Last edited: Nov 6, 2023
    dbeshkenadze_saber likes this.
  3. tonyoakden2

    tonyoakden2

    Joined:
    Oct 14, 2016
    Posts:
    15
    thanks Martin. I probably should have mentioned that I'm developing for the Switch. The version of Unity we are using is 2021.3.30 so a bit old but we can't upgrade because of several dependencies. Reading the documentation it sounds like memory allocated by native plugins would be in untracked? I assume that would include WWISE which we use for sound?
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,408
    Correct on both counts. On 2022 WWise could use our Native Plug-in Memory Manager API, with witch the Profiler would know about that memory too. But for 2021, it's untracked.
     
    dbeshkenadze_saber likes this.
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,408
    Oh yeah, and forgot to mention it but you can import into or directly capture snapshots from an empty 2022.3 project and thereby use the newer package UI from 1.0/1.1. It won't have all the data as a 2022.3/2023.1+ snapshot would have, but that might still give you some clearer workflows