Author Topic: Inspector won't let me chose animation  (Read 5038 times)

kreso

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Inspector won't let me chose animation
« on: April 17, 2013, 09:11:35 PM »
Hi there!

I am working with NGUI last 3 hours trying desperately to enable animations. I read forums and googled/youtubed all I can find with no success.

The problem is when I attach UIButtonAnimation script to a button I can't select animation ('target' field). Inspector opens with SCENE tab completely empty, and if I choose ASSETS tab I can see the animations but am unable to select any (after double-click nothing happens, target field is empty).

If I open the NGUI Example 3 Scene everything works as it should. But if I say remove the animation from UIButtonAnimation script I can't add it back again (same thing happens as described in previous paragraph).

Any idea what could have potentially gone wrong?

Thanks,
Kreso

kreso

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Inspector won't let me chose animation
« Reply #1 on: April 18, 2013, 01:04:05 PM »
Dear Aron,

Does the UIButtonPlayAnimation uses some kind of filtering when opening Unity Inspector panel (to select target animation)?
If yes, does this filtering happen in NGUI? And if yes can you please tell me where?


Thank you!

Kreso

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Inspector won't let me chose animation
« Reply #2 on: April 18, 2013, 05:16:35 PM »
In order to play an animation, the animation must be present in the scene. Unless you add it to some object, you won't be able to select it.

kreso

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Inspector won't let me chose animation
« Reply #3 on: April 18, 2013, 05:20:29 PM »
Hi Aren,

thanks for the reply!

That makes perfect sense, but it doesn't happen for some reason.
Even if I open "example scene 3" (where animations are attached to panels, buttons etc..), inspector shows only 'none'. It always shows 'none' no matter what I do.

Any other ideas?

Thanks,
Kreso

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Inspector won't let me chose animation
« Reply #4 on: April 18, 2013, 05:24:20 PM »
Just drag & drop the actual game object on which the animation resides (from the hierarchy window).

kreso

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Inspector won't let me chose animation
« Reply #5 on: April 18, 2013, 05:40:18 PM »
That's it!!


Thanks,
Kreso