Author Topic: Enabling/Disabling UIWidgets inside animationcurves  (Read 2782 times)

getluky

  • Guest
Enabling/Disabling UIWidgets inside animationcurves
« on: April 17, 2012, 01:07:44 PM »
I'm sequencing a series of sprites within Unity's animation editor, and I noticed that I can actually toggle the enabled property of UISprite  components within the animation editor, which seems to toggle visibility correctly. This lets me swap between a blurred and focused sprite to have a fly-in effect, for example.

Is this a good idea? I know that in an extremely small timescale, the interpolation may result in both sprites being visible at the same time, but I can't think of any other problems, and it's nice to be able to see the sprites switching while editing animations. Are there other issues with directly disabling UIWidget components?

I imagine that I could also animate a custom script property that handles clean switching between frames in a nicer manner, but it wouldn't be visible inside the animation previews in the editor.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Enabling/Disabling UIWidgets inside animationcurves
« Reply #1 on: April 17, 2012, 06:18:16 PM »
Changing the 'enabled' property is just fine, yeah. It's how to disable widgets.