Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Increased untracked memory between snapshots.

Discussion in 'Profiler Previews' started by FuriaFurini, May 2, 2023.

  1. FuriaFurini

    FuriaFurini

    Joined:
    Sep 27, 2018
    Posts:
    1
    Hi,


    I’m currently working on an optimization in a game with a new navigation screen system using one scene per screen, instead of a single scene. We went from having every screen referenced in a ScriptableObject that was loaded via Resources.Load() to additively loading a scene for each screen.


    Although I can see an improvement comparing both android versions with the memory profiler (v 0.0.7), I’m seeing that the memory that was released in the old implementation still remains in the new implementation, but under the category of “Untracked Memory”.


    Comparing both snapshots I can assure that the prefabs and textures were removed jumping between screens, but In the overall I can see that total memory remains the same:

    Screenshot 2023-04-28 at 12.34.21.png

    Do you guys have any ideas why this is happening?
     
    alexeyzakharov likes this.
  2. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    507
    I would suggest that potentially those could be graphics resources. Which version of Unity do you use and what patform is this?

    We did substantial improvements to graphics memory tracking for 2023.2 (and recently backporting those to 2022.2) as e.g. such objects as RenderTextures weren't properly accounted. I would ask to check 2022.2 if possible
     
    Last edited: May 15, 2023
  3. Nullrigin

    Nullrigin

    Joined:
    Nov 3, 2020
    Posts:
    6
    Hey FuriaFurini, have you found out what caused those untracked memory increases?

    I am currently facing the same problem: Unmanged memory increasing up to 2GB as you progress the game. When I inspect some Unity Objects in the profiler I also get the hint "This Native Object is associated with an invalid Managed Object [...]" which is a bug apparently. Profiler version is 1.1.0-exp.1, used in Unity 2023.1.6f1, taking snapshots of a dev build made in Unity 2021.3.9f1. Loading scenes additively through Addressables (1.21.14)

    Any idea why this could happen @alexeyzakharov ?