Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Bradamante3D on June 02, 2013, 10:18:20 PM

Title: Trying to understand menu swap
Post by: Bradamante3D on June 02, 2013, 10:18:20 PM
Hi,
I am studying the NGUI examples and have a bit of trouble understanding them. In the Main Menu example (http://www.tasharen.com/ngui/example8.html) and the interaction example (http://www.tasharen.com/?page_id=643) you're are both swapping out content, i.e. moving them around. In the Main Menu you use animation, in Interaction a tween. I understand that part, but I don't see how you activate them from the Outside.

There's no script saying
  1. OnActivation
  2. this.GetTween().Start()

or

  1. OnClick
  2. target.GetAnimation("Name").StartOnce()

Know what I mean? How do you start them from the outside? Must happen somewhere in the Inspector, so I'm kinda frustrated I don't see it :(
Title: Re: Trying to understand menu swap
Post by: ArenMook on June 03, 2013, 12:37:01 AM
UIButtonTween script on the button points to the remote tween.
Title: Re: Trying to understand menu swap
Post by: Bradamante3D on June 03, 2013, 02:07:57 PM
Uh OK looking at the code I see it.

The target is a GameObject and you get all tweens via

  1. go.GetComponentsInChildren<UITweener>()

and TweenTransform inherits from UITweener.