Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: 80dots on March 05, 2015, 07:51:02 AM
-
Hello.
I'm making Inventory system using NGUI 3 and Unity 5.
When player select the item on the field, Item slot image will change to Item image.
I'm using ..GetComponent<UISprite>().spriteName = "ItemImage".
It's works well.
But problem is changed sprite image is reset.. when Close and re open Inventory UI.
I used .SetActive(true) and SetActive(false) for showing and hiding InventoryUI.
Is there someone how I can solve this problem?
-
You can't just change the sprite. You have to alter the code where the sprite is set to begin with. Where is it set from initially? That's where it should be altered, not on the sprite.