Author Topic: Detect Version?  (Read 2530 times)

djflan

  • Guest
Detect Version?
« 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.



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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Detect Version?
« Reply #1 on: August 23, 2013, 02:42:16 PM »
You can do sprite.atlas.GetSprite() in both.

djflan

  • Guest
Re: Detect Version?
« Reply #2 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