Author Topic: tween method  (Read 6641 times)

beermoney

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 80
    • View Profile
tween method
« on: January 25, 2014, 10:34:20 AM »
there appears to be no option in the inspector to set a tween's "method" property, currently I have to do this on a script

tweenPosition.method = UITweener.Method.BounceIn;

was this there before?  (I can't remember) or maybe its moved?
thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tween method
« Reply #1 on: January 25, 2014, 03:32:17 PM »
Just modify the curve. You can do all kinds of effects with it. Not just bounce, but anything you like.

lelag

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: tween method
« Reply #2 on: January 30, 2014, 05:34:40 AM »
Is there a particular reason for that property to be hidden in inspector ?
Some presets were useful, and tweaking curves is a pain, you loose a lot of time.
I'd like to have that propery (tween method) back. Seems that removing [HideInInspector] is not enough.

Cripple

  • TNP Alpha
  • Full Member
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 117
    • View Profile
Re: tween method
« Reply #3 on: January 30, 2014, 05:45:41 AM »
You have to modify the Editor of TweenPosition if you want to expose that property ([HideInInspector] works only for default Unity inspectors).

NGUI/Scripts/Editor/TweenPositionEditor.cs
Graphicstream Dev.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tween method
« Reply #4 on: January 30, 2014, 11:31:37 AM »
It's hidden because it's meant to remain as backwards compatibility with older versions, but it's not meant to be used anymore as you should simply adjust the curve now.

lopez1de

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: tween method
« Reply #5 on: September 17, 2014, 06:54:47 AM »
Editing the animation curve is a pain. Why not adding some more presets? And why isn't the duration of the tween taken into account for the curve?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tween method
« Reply #6 on: September 17, 2014, 12:48:31 PM »
The curve is 0-1. Duration doesn't change the curve, it's used externally so you can define the curve you want, then alter the duration without having to mess with your curve.