Hello Guest

Author Topic: tk2D with assetbundles is packing the spritecollections with the build  (Read 3592 times)

orson

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hi,
I'm using tk2d heavily in my project. now i'm trying to use asset bundles and it's not so smooth.
I installed the asset bundle manager, and marked all the sprite collection data objects under asset bundle 'main'.
Having done this I expect to get a much smaller build, which does not include the sprite collection atlases, but this is not the case.
The resulting build includes all the sprite collections.
Even if I build the project without any scenes, or only 1 empty scene, it still packs the sprite collections with the build.

The build log shows the following:

Used Assets and files from the Resources folder, sorted by uncompressed size:
 85.3 mb    18.7% Assets/SpriteCollections/TeamFixed Data/atlas0.png
 85.3 mb    18.7% Assets/SpriteCollections/TeamDynamic Data/atlas0.png
 85.3 mb    18.7% Assets/SpriteCollections/Popups Data/atlas0.png
 85.3 mb    18.7% Assets/SpriteCollections/FX Data/atlas0.png
 21.3 mb    4.7% Assets/SpriteCollections/Map Data/atlas0.png
 16.0 mb    3.5% Assets/SpriteCollections/Tutorials Data/atlas0.png
 16.0 mb    3.5% Assets/SpriteCollections/Level Data/atlas0.png
 16.0 mb    3.5% Assets/SpriteCollections/Additives Data/atlas0.png

To me this suggests that unity is treating the sprite collections as it would treat assets that are placed in the resources folder. Why?
Could it be because I have prefabs in the resources folder which reference sprite collections?
What should I do to correct this?

thanks
« Last Edit: July 24, 2016, 03:54:14 pm by orson »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Yes, it will be because of prefabs in resources - anything in resources will automatically be included in a build, including all linked assets. The sprite collection will be a linked asset on any sprite prefab.