Author Topic: Control NGUI programatically  (Read 2380 times)

CazicThule

  • Guest
Control NGUI programatically
« on: January 15, 2013, 06:13:48 PM »
Is it possible to control NGUI programatically? For example, I want to make an inventory system. Obviously, the sprites shown would need to be dynamic based upon what the player has in their inventory. Is this possible?

dlewis

  • Guest
Re: Control NGUI programatically
« Reply #1 on: January 15, 2013, 06:45:21 PM »
Yep.

All you will need is access to the UISprite component and you can change the image by going mySprite.spriteName = "nameOfNewSprite";