Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice
  2. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

Where is the memory coming from?

Discussion in 'Profiler Previews' started by RakNet, Jan 29, 2021.

  1. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    289
    The memory profiler isn't very useful if there is no way to tell where the memory is coming from. For example, in my profile on game startup, in the 2D main menu, I have several large textures for a 3D cow model, although the cow model is not in a resources directory or otherwise linked in any way that I know of besides being in a few scenes.

    upload_2021-1-28_22-35-45.png

    I even profiled the game and the cow model texture is still there for some reason.

    * Edit * To clarify I'm not asking about the cow specifically. I'm asking for a feature, which is that the memory profiler needs to indicate where and why items are included.
     
    Last edited: Jan 29, 2021
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,662
    Hi there,
    Yes, we're aware of this missing piece and working towards having Call Stacks in all Allocations but that needs a fundamental change to the entire low level allocation system so that might be a ways out into the future still.

    In the mean time, going through the references to the textures should still give you some idea as to what chain of references caused it to get loaded in.
     
unityunity