Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: djflan on August 22, 2013, 09:44:46 PM

Title: Detect Version?
Post by: djflan on August 22, 2013, 09:44:46 PM
Is there a way I can detect which version of NGUI is present?

I ask because I am developing an inventory extension based on NGUI (http://www.youtube.com/watch?v=edhz2D1rZPo).

(http://i.imgur.com/aVVZQpD.png)

Neither work in both situations and I don't want the user to have to change the script.

Sorry I had to post the code as an image :o, but for some reason just surrounding the code with code tags resulted in an error every time I hit post.
Title: Re: Detect Version?
Post by: ArenMook on August 23, 2013, 02:42:16 PM
You can do sprite.atlas.GetSprite() in both.
Title: Re: Detect Version?
Post by: djflan on August 23, 2013, 03:14:55 PM
Thank you, that worked.....I was stupidly using: slotSprite.atlas.GetSprite(slotSprite.name).inner.width instead of .spriteName reference