Author Topic: Tween vs Unity Animation - When to use which?  (Read 18292 times)

nübi

  • Guest
Tween vs Unity Animation - When to use which?
« on: April 04, 2013, 10:16:19 AM »
Hi guys,

I'm on week 2 of learning Unity. I'm about 4 days into NGUI.

That said, I see that there are several options for animating NGUI elements... Tweening with UITweener and UIButtonTween; Unity's animation editor and UIButtonPlayAnimation script; etc.

Is one preferrable to the other?  Or is this just a case of having more than one way to animate things?

Thanks.

jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: Tween vs Unity Animation - When to use which?
« Reply #1 on: April 04, 2013, 10:23:28 AM »
I like unity animations, but depends in your needs.

nübi

  • Guest
Re: Tween vs Unity Animation - When to use which?
« Reply #2 on: April 04, 2013, 10:33:37 AM »
I like unity animations, but depends in your needs.

Can tweening or animations animate something the other cannot?

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
Re: Tween vs Unity Animation - When to use which?
« Reply #3 on: April 04, 2013, 01:26:31 PM »
If you procedurally alter the tween you can tween between dynamic locations if you use the components. With static Unity animations their start-end locations are the same.

nübi

  • Guest
Re: Tween vs Unity Animation - When to use which?
« Reply #4 on: April 04, 2013, 01:28:46 PM »
Ah sure OK that makes sense. Thanks.

Dada

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Tween vs Unity Animation - When to use which?
« Reply #5 on: July 09, 2014, 05:05:37 AM »
I know this is an old topic, but I have a relevant question that doesn't warrant creating a separate topic.
I have a button that I need to animate - it needs to continuously pulsate a bit. Now, my first thought was to just use tween scale to animate it. But since the animation doesn't need to be programmatically altered, I'm thinking of using plain old unity animations on the buttons to scale them, because I think animation will perform better than tweens, especially on mobile. Is this true? How big is the difference in performance between NGUI Tween Scale and unity animation?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Tween vs Unity Animation - When to use which?
« Reply #6 on: July 09, 2014, 06:29:31 AM »
Having no raw data to look at, I'd wager that there isn't much difference performance-wise, to be honest. The advantage of regular animations is that you can set up a keyframe animation that's more complex than you could easily do with tweens. Tweening is really only for A to B, position scale, alpha etc. While animations can do all sorts of wobble on the way.

For your case, animations seems like the right way to go.