Author Topic: Alpha Setting?  (Read 3584 times)

DevMan5000

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 22
    • View Profile
Alpha Setting?
« on: January 06, 2015, 12:03:20 AM »
Hi, I may be missing something, but I can't seem to find how to set an object's alpha value.

Do I have to use an alpha tween (like in the code below)?

Also, how do you get an object's current alpha value? Is there an easy accessor?

Lastly, is there any input gating during a tween? I.e. can the player still hit the button during the tween to alpha 0?

Thanks!

  1. // Set the BackBtn's alpha to 0 since we are on the main menu.
  2. TweenAlpha tweenOn = TweenAlpha.Begin (mBackBtn, 0.0f, 0.0f);
  3. tweenOn.from = 0.0f;
  4.  

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Alpha Setting?
« Reply #1 on: January 06, 2015, 09:20:18 AM »
UIWidgets and UIPanel has an alpha property you can access and set. Gameobjects themselves don't.

Yes, the player can touch while a tween is playing.