Author Topic: [SOLVED] change UISprite Alpha  (Read 2387 times)

johanesnw

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 22
    • View Profile
[SOLVED] change UISprite Alpha
« 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
« Last Edit: April 01, 2014, 11:29:08 PM by johanesnw »