Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: johanesnw on April 01, 2014, 11:08:41 PM

Title: [SOLVED] change UISprite Alpha
Post by: johanesnw on April 01, 2014, 11:08:41 PM
its the example code

  1. chargebar.GetComponent<UISprite>().color.a = 0;
as I know the value is a number. so if its not 0, it should be 0f.

the error says
"cannot modify the return value of 'UIWidget.color' because it's not a variable"

EDIT:
I just wanna hide the GUI. using isVisible will get the error
"property of indexer "UIWidget.isVisible" can't be assigned -- it's read only"

thanks.


EDIT(again):
goes to class reference and found uiwidget.alpha that can be assigned with number