Hello Guest

Author Topic: Sprite collection - why both atlas and images included in build  (Read 3568 times)

bahaahamza

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Hi

i have a sprite collection with multiple images. I thought an atlas will be created, and this atlas will be used in the final build.
But checking the Editor.log file, i found both the atlas and the separate images included during build.
Is this the normal behavior, or is there a way to exclude the images and use only the atlas?

This is how the Editor.log looks like:
Used Assets, sorted by uncompressed size:
 8.0 mb    17.0% Assets/Test/SpriteCollection/Images1 Data/atlas0.png
 1.2 mb    2.5% Assets/Test/Images/Small/image1.jpg
 982.6 kb    2.0% Assets/Test/Images/Small/image2.jpg
 960.1 kb    2.0% Assets/Test/Images/Small/image3.jpg
 900.1 kb    1.9% Assets/Test/Images/Small/image4.jpg
.....

There are many images, their total size ~27M. The atlas is 8M, so the total is 35M.

Sorry if it's a duplicate question, i already searched in FAQ and in the forum but failed to find a similar one.

Thank you.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprite collection - why both atlas and images included in build
« Reply #1 on: March 28, 2015, 02:09:24 pm »
Have you dragged a reference to the sprite collection (tk2dSpriteCollection) object anywhere in your project? The tk2dSpriteCollectionData object, i.e. the one thats used at runtime, doesn't have any references to the source images.

bahaahamza

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Sprite collection - why both atlas and images included in build
« Reply #2 on: March 28, 2015, 02:25:16 pm »
Thanks a lot.
Indeed that was the problem, I've been always using the sprite collection (attaching it to a script then getting the Data inside script).
I used the sprite collection data instead, and the issue is resolved.

Thank you :)