playMaker

Author Topic: Setting animation keyframe values?  (Read 1437 times)

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Setting animation keyframe values?
« on: March 09, 2017, 06:44:24 PM »
I have a UI menu that slides out when tapped. The sliding aspect is handled by Unity's animation system, with keyframes for the start and end positions of the UI element.

I'd like the menu to slide to different distances based on the amount of dynamic content within it. For example, if the menu has 4 icons, change the UI element's "bottom" position in the final animation keyframe to "80". If the menu has 5 icons, change the "bottom" position to "100", etc.

Is there any way to target an individual animation keyframe's values in PlayMaker? I'm able to target the UI element's default "bottom" position using the "set property" action, but I can't seem to find a way to target or change this position during a specific keyframe. Is there any way to do this?

Image attached, in case it helps better describe what I'm trying to do!

Thanks!!
« Last Edit: March 09, 2017, 06:46:24 PM by Breadman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Setting animation keyframe values?
« Reply #1 on: March 10, 2017, 05:06:59 AM »
Hi,

 you could use the event proxy monobehavior to send a PlayMaker event using the animation event system,

but since you are animating the slider already, why not controlling within these keys the rect transform values as well?

Bye,

 Jean