Hello Guest

Author Topic: Can't change texture compression settings?  (Read 8709 times)

dmcdonough

  • Newbie
  • *
  • Posts: 6
    • View Profile
Can't change texture compression settings?
« on: March 09, 2012, 02:21:29 pm »
Just installed 2D Toolkit, and suddenly all the textures I import can't be changed from Automatic Truecolor compression. The textures I had imported before I got the toolkit are unchanged, but any new ones I bring in -- including straight duplicated of those pre-existing texture -- are set to Texture Type --> Advanced and can't be changed to anything else. I can't make them GUI textures, can't make them compressed, can't do anything to keep their size down. The only thing I can see that changed was I installed 2D Toolkit and Simple UI for 2D Toolkit.

Has anyone else seen something like this happen?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Can't change texture compression settings?
« Reply #1 on: March 09, 2012, 02:28:27 pm »
Any textures you use for 2D Toolkit will be converted to Advance and Automatic True Color will be set on them. This is by design, as they have to be a in a particular format for the system to be able to read them in and build an atlas out of them. Those textures will also not be included in your build, 2D Toolkit will only use the final atlas textures.

You can set the compression format of the final atlas texture in the SpriteCollection inspector.

Hope that helps.

dmcdonough

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Can't change texture compression settings?
« Reply #2 on: March 09, 2012, 02:50:28 pm »
True, but that's not what I was referring to. When adding a texture to a sprite collection, I see that it gets converted when the collection is committed and built, and that's perfectly fine. What I was noticing was that all my textures were being converted the moment I imported, and couldn't be changed back regardless of whether or not I intended them for use in a sprite collection. This meant, for instance, that small icon textures I was using for custom editors were all getting locked in Truecolor mode and adding unnecessary bloat to the project.

I believe I found the answer, though: in the SimpleUI files there's an AssetProcessor script that overrides the OnPreprocessTexture callback to automatically set the texture import settings. I can't credit why this is necessary, as once again not every texture in my project is meant for use in the final GUI. Commenting out the content of this script allows me to set my textures by hand again, without apparently harming the process in 2D Toolkit of converting them for proper use in sprite collections.

There's no SimpleUI forum that I can find, so I hope others that use that package in conjunction with 2D Toolkit find their way here to comment on the purpose of this script.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Can't change texture compression settings?
« Reply #3 on: March 09, 2012, 09:26:51 pm »
Thanks for clarifying that. I wasn't aware of what SimpleUI was doing, nor can I think of any reason it would need to do that. I have alerted the author of the project to this thread.

unikron

hermesdavidms

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Can't change texture compression settings?
« Reply #4 on: March 09, 2012, 10:33:58 pm »
hello there, SimpleUI author here.. first im sorry, leaving that AssetProcessor.cs script in the Editor folder inside the SimpleUI was a mistake, that file was meant to be for my own use only, and i surely left it by mistake when i submitted the package to the Asset Store

so to fix the problem, just delete that file, and everythings ok

i will submit a corrected version to the asset store as soon as possible
Cheers!
Hermes David Montes de Oca Segovia