Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: zipper on November 15, 2013, 12:27:22 AM

Title: UISprite.sprite
Post by: zipper on November 15, 2013, 12:27:22 AM
Hi,

Just wondering if the removal of UISprite.sprite was intentional. I didn't see anything about it in the docs.

I have some code that iterates through albums and

  1. Picture.sprite = Picture.atlas.spriteList[_index]; // -> used to work

just feels better than

  1. Picture.spriteName = Picture.atlas.spriteList[_index].name;

It's a minor quibble, but i think setting the sprite directly is useful.
Title: Re: UISprite.sprite
Post by: ArenMook on November 15, 2013, 04:34:15 AM
Honestly I don't remember when I removed it, but with a direct sprite assignment it was possible to assign sprites from a different atlas -- which is why I am guessing I did that. It's better to have one way of doing something than two.