Search Unity

Sprite textures atlases and Asset Bundles

Discussion in '2D' started by GuyTidhar, Nov 23, 2015.

  1. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    Hi guys,

    As we are making quite a heavy use of AssetBundles for our 2D game, I am wondering about how textures are bundled.

    Basically my question is whether if a sprite texture is referenced in prefab which is tagged to be included in a certain AssetBundle, will it be atlased in the bundle and will it not get into the build itself if I have no reference to that texture in objects compiled with the build?

    Also, I see that referencing a texture in a prefab marked for asset bundling, makes it part of the bundle. Does that mean I do not need to mark the texture it self as part of the asset bundle in such a case?

    I also wonder what happens when two different prefabs tagged for different asset bundles that reference an asset (texture for instance) do? do they both add that asset to the bundle?

    Bottom line: I want asset bundles to pack the texture I give it as part of its prefabs and I do not want those textures to be included in the build.
     
    Last edited: Nov 24, 2015
  2. GuyTidhar

    GuyTidhar

    Joined:
    Jun 24, 2009
    Posts:
    320
    Inglorious bumperry.