Author Topic: NGUI Animation problem  (Read 2502 times)

AntonBaasan

  • Guest
NGUI Animation problem
« on: July 17, 2013, 03:01:06 AM »
Hello,
I am a newbie with the NGUI. I have started to make a main menu in my project. And something weird happens with the functions TweenAlpha.Begin, TweenTransform.Begin.
I called them at the Start () function and they do what I expected. But after that, when I move mouse over the buttons, they play backward animation that I did at the Start() function.
If I uncheck UIButton, UIButton Scale and UIButton Offset scripts on the buttons than on problem anymore. But thing is that I want these scripts on my button.

Am I missing something ?

P.S. Attached an example scene.
« Last Edit: July 17, 2013, 03:51:38 AM by ArenMook »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Animation problem
« Reply #1 on: July 17, 2013, 03:49:05 AM »
The button comes with its own set of tweens that get added. If you want to make yours tween, do it on a parent or a child object, not on the UIButton's object.

And in the future, don't post NGUI code in a public forum. I will ban you for doing that.

AntonBaasan

  • Guest
Re: NGUI Animation problem
« Reply #2 on: July 17, 2013, 09:14:00 AM »
Got it. Thank you so much Aren. I think you should've add some more videos about the animation/tween.

So sorry about the source code. Next time will put only my code.

AntonBaasan

  • Guest
[SOLVED] Re: NGUI Animation problem
« Reply #3 on: July 18, 2013, 10:06:10 AM »
Hey. I made a parent gameObject and created Tween on it. Now TweenTransform.Begin works ok but  TweenAlpha.Begin still having some bug on Mouse over event.

I have started to use iTween and now everything works as I wanted.
Thank you.