Support => NGUI 3 Support => Topic started by: Groszq on April 09, 2013, 11:54:40 AM
Title: UISprite Make Pixel Perfect Runtime
Post by: Groszq on April 09, 2013, 11:54:40 AM
I have really big problem with making uisprite pixel perfect while running the game.
After the change of the sprite in UISprite executing MakePixelPerfect doesn't take effect on the picture so it keeps the scale from the sprite before the new one. Here's the fragment from my code:
Title: Re: UISprite Make Pixel Perfect Runtime
Post by: ArenMook on April 09, 2013, 09:35:58 PM
1. Never use FindChild. Add a public variable to your UISprite and drag & drop it in inspector. 2. If you do use FindChild, at the very least cache the value so you don't call FindChild more than once. It's slow enough once! 3. MakePixelPerfect only works if the sprite is a normal sprite. Sliced or tiled sprites are not affected the same way.
Title: Re: UISprite Make Pixel Perfect Runtime
Post by: triggly_glix on September 26, 2013, 11:51:37 AM
I'm having this same problem - the sprite is normal - not tiled or sliced... i definitely have the right gameObject - it's just been instantiated - straight after i call MakePixelPerfect on the UISprite but it doesn't work... ideas? thanks :)