Author Topic: Confused about GameObject for GUI Object  (Read 5283 times)

Dennis59

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
    • View Profile
Confused about GameObject for GUI Object
« on: February 18, 2013, 08:42:06 PM »
I am setting up a fade transition for a splash screen in a game that I'm working on. The splash screen is a "Simple Texture" widget that fades in and out by changing the alpha.  After it fades out I want to disable it so that it is invisible using NGUITools.SetActive(go, false);.  I thought it may be as simple as GameObject.FindWithTag("Splash"); but that results in a compile error.

Any suggestions would be greatly appreciated.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Confused about GameObject for GUI Object
« Reply #1 on: February 18, 2013, 08:57:16 PM »
Tweens have a delegate you can set -- UITweener.onFinished.

Dennis59

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: Confused about GameObject for GUI Object
« Reply #2 on: February 18, 2013, 09:54:56 PM »
ArenMook, thanks for the quick response.  Is there a Tweener that will adjust alpha?  The closest appears to be the color tweener but it doesn't appear to adjust alpha. 

GameObject.Find("Splash"); does work however the tween may be a cleaner approach.

dlewis

  • Guest
Re: Confused about GameObject for GUI Object
« Reply #3 on: February 18, 2013, 10:03:51 PM »
TweenAlpha

Dennis59

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: Confused about GameObject for GUI Object
« Reply #4 on: February 19, 2013, 06:30:28 PM »
dlewis, thanks for the information but I don't see a tweenalpha.  I've looked in the scripts, the Unity editor and so on.  I have the free version currently.  Could that be the problem?

dlewis

  • Guest
Re: Confused about GameObject for GUI Object
« Reply #5 on: February 19, 2013, 06:50:20 PM »
TweenAlpha is definitely a thing so it's possible that it was added after the last time the free version was updated.

Dennis59

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: Confused about GameObject for GUI Object
« Reply #6 on: February 19, 2013, 07:22:00 PM »
Thanks, that would be my guess.  After my last post I did see another post discussing this problem and AronMook suggested that it could be due to an older version of NGUI.  It isn't an issue for now, I'll do it the brute force way and check into that when I purchase the package later in the month.

Thanks again.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Confused about GameObject for GUI Object
« Reply #7 on: February 19, 2013, 08:15:18 PM »
Yeah free version comes as-is, and doesn't come with support.