Welcome,
Guest
. Please
login
or
register
.
June 09, 2026, 04:51:20 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Stucked with making simple tween interaction
« previous
next »
Print
Pages: [
1
]
Author
Topic: Stucked with making simple tween interaction (Read 5665 times)
AlexSudnikov
Newbie
Thank You
-Given: 1
-Receive: 0
Posts: 9
Stucked with making simple tween interaction
«
on:
May 23, 2013, 03:14:48 PM »
Hey guys,
I'm pretty new to unity and ngui and I'm kind of lost...i'm trying to animate a menu : when it's "OnHoverTrue" it's got to play forward..."OnHoverFalse" got to bring it back to it's initial position.I've got two UIButtonTween scripts and TweenPosition on an object but it's doesn't work right.I'd be happy to get any advice, thanks!
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Stucked with making simple tween interaction
«
Reply #1 on:
May 23, 2013, 09:12:42 PM »
A single animation with UIButtonPlayAnimation script triggering it, with trigger set to "OnHover" will do just that.
Same as a single tween with UIButtonTween triggering it, with trigger set to "OnHover".
The true/false stuff is handled automatically for hover events.
Logged
AlexSudnikov
Newbie
Thank You
-Given: 1
-Receive: 0
Posts: 9
Re: Stucked with making simple tween interaction
«
Reply #2 on:
May 24, 2013, 05:00:13 AM »
Thanks a lot for the answer.
Well , i think the real problem is that OnHover event is being triggered continiously...so my menu animation looks more like shaking.I wonder if there is kind of OnMouseEnter trigger.
Logged
mathiassoeholm
Newbie
Thank You
-Given: 1
-Receive: 4
Posts: 35
Re: Stucked with making simple tween interaction
«
Reply #3 on:
May 24, 2013, 06:16:30 AM »
There is
http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnMouseEnter.html
Logged
AlexSudnikov
Newbie
Thank You
-Given: 1
-Receive: 0
Posts: 9
Re: Stucked with making simple tween interaction
«
Reply #4 on:
May 24, 2013, 08:04:24 AM »
Yeah thx, i've read about it.
The thing is that it doesn't seem to work with ngui.I mean , when it's just unity camera - it works great.
Once i add NGUI's gui setup it's just won't seem to call this event...
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Stucked with making simple tween interaction
«
Reply #5 on:
May 24, 2013, 05:44:08 PM »
OnMouseEnter is a Unity callback, and should not be used. OnHover is an NGUI callback, and should only be called once, not continuously. Why would it be continuous? Do you disable the collider causing it to leave the area next frame?
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Stucked with making simple tween interaction