Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug 2 instances of same map with different compression size found in memory

Discussion in 'Editor & General Support' started by aurelag, Mar 3, 2022.

  1. aurelag

    aurelag

    Joined:
    Jan 25, 2021
    Posts:
    11
    So while profiling for my app, I found out that several atlas maps that are compressed (in ASTC for Quest) were found twice in memory, and at different memory sizes ? We can find one instance at 85MB (which is the uncompressed size) and one other at 9.5MB (which is the compressed size, both in the memory profiler and in the inspector). All the while knowing that there is only one instance of said map in the entire project.

    How is that possible ?
     
  2. Skiriki

    Skiriki

    Joined:
    Aug 30, 2013
    Posts:
    66
    Are you taking snapshots from the Editor or from a player? It sounds like the player but just to be certain. The Editor can be a bit funky with atlases and their memory usage.

    If this is happening in a Player, could it be that the atlas is paged and that the pages have a different resolution? i.e. the contents don't fully fit into one atlas so it creates two at different sizes?

    Also, are you loading the atlas from an AssetBundle? maybe it is in two separate AssetBundles and therefore duplicated?
     
  3. aurelag

    aurelag

    Joined:
    Jan 25, 2021
    Posts:
    11
    I am indeed taking snapshots from the player.

    We are using atlasses for our 3D objects and are not using paged atlasses.

    The atlas itself is not in an AssetBundle, but the material it is attached to is loaded using Addressables.
     
  4. Skiriki

    Skiriki

    Joined:
    Aug 30, 2013
    Posts:
    66
    So the material is in an AssetBundle but the atlas is not? Maybe that's the problem?