Author Topic: NGUI is converting my UITexture to a UISprite automatically...?  (Read 3608 times)

leagueofmonkeys

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 20
    • View Profile
NGUI is converting my UITexture to a UISprite automatically...?
« on: December 10, 2014, 02:41:41 AM »
Hi  :)

If NGUI detects that I'm using the same texture map in a UITexture that I also have in a atlas it frustratingly turns my UITexture into a UISprite.  For the time being every time I update the texture map I have to duplicate it and rename it to use it in my UITexture.

I understand why this behaviour exists but can I disable it?

I using a UITexture because I need to use the texture offset functionality it provides that UISprite does not.

Thanks for reading  ;D

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI is converting my UITexture to a UISprite automatically...?
« Reply #1 on: December 11, 2014, 08:36:00 AM »
You shouldn't duplicate textures as both textures and sprites. Stick to one or the other. Still, if you don't like this behaviour, just comment out line 1064 of UIAtlasMaker.cs.
  1. //NGUIEditorTools.UpgradeTexturesToSprites(NGUISettings.atlas);