Search Unity

BlobAssets Get Duplicated (and prefabs)

Discussion in 'Entity Component System' started by l33t_P4j33t, Aug 14, 2021.

  1. l33t_P4j33t

    l33t_P4j33t

    Joined:
    Jul 29, 2019
    Posts:
    232
    my blobs are getting duplicated when in different subscenes:


    is there any way to have one common asset, the same way textures, meshes, audio clips, etc. don't get duplicated?
    same for prefabs, the entity representations get duplicated

    guess only way is to have a third subscene thats only loaded once, and extract the blobs & prefabs from that at runtime
     

    Attached Files:

    Last edited: Aug 14, 2021
  2. Zec_

    Zec_

    Joined:
    Feb 9, 2017
    Posts:
    148
    I have noticed this as well. And I'm almost certain that if you load the same subscene multiple times via subscene instantiation, you also load multiple copies of the same BlobAsset.

    Just like you, I wish that there would be some kind of asset bundle handling/deduplication for these kinds of "assets" that would ref-count the asset for each loaded subscene that uses it.