Hello Guest

Author Topic: Unnecessary Images Built on Export  (Read 4027 times)

borrismoose

  • Newbie
  • *
  • Posts: 4
    • View Profile
Unnecessary Images Built on Export
« on: January 21, 2013, 03:39:07 pm »
Hello,

I am making optimizations to a game nearing completion and after checking the editor log post-build, I have noticed unnecessary .png images being exported. These images are used in Sprite Collections but also appear in their native format.

What is strange is, this is only true in some cases. I have quite a few Sprite Collections and for most of them, the source images do not get exported only the atlas0.png file. However, for a few Sprite Collections the source images are also being exported.

I know Unity controls what gets built based on the scene file but I'm sure that these files are not being used outside of 2D Toolkit. Am I missing some reason why they may be exported?

borrismoose

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Unnecessary Images Built on Export
« Reply #1 on: January 21, 2013, 04:19:18 pm »
OK, I think I may have answered my own question. Was doing something silly but may be useful for others to know.

I had established links to Sprite Collections from objects in my scene when what I should have done is link to the Sprite Collection Data. Linking to the sprite collection meant Unity had to keep a reference to all of the source assets.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Unnecessary Images Built on Export
« Reply #2 on: January 22, 2013, 11:50:48 am »
Yes. This isn't as obvious as it should be. You shouldn't be able to make a reference to the editor data object - I'll be addressing it in 2.0 or when I break backwards compatibility.