Author Topic: PlayIdleAnimations?  (Read 2854 times)

Sephiroth73003

  • Guest
PlayIdleAnimations?
« on: April 22, 2012, 05:48:56 PM »
Just started working with NGUI and really enjoying the texture atlasing and everything. Looking into make my own stuff outside the tutorials now, but can't seem to get the "PlayIdleAnimation" script to work.

I create a gameobject called Animation and put it as a child of my button and put in my animation called "idleWobble" and have even tried renaming it "idle".

Wobble is just a simple rotation based script. I know there is "TweenRotation" or something like that, but want to try and getting custom animations working. Any recommendations?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: PlayIdleAnimations?
« Reply #1 on: April 22, 2012, 06:05:28 PM »
PlayIdleAnimations script is an example script used only in the orc inventory example. It's kinda specific to that one, it's only used to animate the orc. If you want something to always be animated, all you need to do is leave the animation enabled with the "play automatically" checkbox set to true. You also will want to make sure your animation is looped. No scripts needed.

Sephiroth73003

  • Guest
Re: PlayIdleAnimations?
« Reply #2 on: April 22, 2012, 07:54:56 PM »
Ya I just wrote my own since it needed to stop when other NGUI scripts did their events. Really enjoying how easy this is to write for 5 stars man. Recent purchaser, definitely giving a solid review.