playMaker

Author Topic: Animate a PlayMaker variable with the Unity Animation tool  (Read 1010 times)

ViRiX Dreamcore

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Animate a PlayMaker variable with the Unity Animation tool
« on: February 11, 2017, 02:35:41 PM »
I have a variable that I exposed to the inspector so that I could get access to it more easily. 

I would like to use it in the Animation timeline, but it doesn't show up in the list of things I can add.

Is there a way to get this to happen? Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14337
  • Official Playmaker Support
    • View Profile
Re: Animate a PlayMaker variable with the Unity Animation tool
« Reply #1 on: February 13, 2017, 12:52:39 AM »
Hi,

 Can you make a screenshot where you would like to use an FsmVariable, I am not too sure I understand the context.

Bye,

 Jean

frogwise

  • Playmaker Newbie
  • *
  • Posts: 45
    • View Profile
Re: Animate a PlayMaker variable with the Unity Animation tool
« Reply #2 on: December 03, 2017, 09:10:27 PM »
I think he means he would like to control exposed FSM variables with the new Unity Timeline, which is what I'm trying to do as well.

For example, exposed color variable that you could animate in Timeline.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14337
  • Official Playmaker Support
    • View Profile
Re: Animate a PlayMaker variable with the Unity Animation tool
« Reply #3 on: December 04, 2017, 12:33:59 AM »
Hi,

 uhm... I see. I will need to give this a close look.I added it to my todos for this week. Can you ping me end of this week if I haven't replied to this thread by then? Thanks :)

 Bye,

 Jean

frogwise

  • Playmaker Newbie
  • *
  • Posts: 45
    • View Profile
Re: Animate a PlayMaker variable with the Unity Animation tool
« Reply #4 on: December 09, 2017, 10:24:37 PM »
Ping! :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14337
  • Official Playmaker Support
    • View Profile
Re: Animate a PlayMaker variable with the Unity Animation tool
« Reply #5 on: December 12, 2017, 01:49:07 AM »
Hi,

 Thanks I need the pings :)

 bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14337
  • Official Playmaker Support
    • View Profile
Re: Animate a PlayMaker variable with the Unity Animation tool
« Reply #6 on: December 12, 2017, 02:42:12 AM »
Hi,

 Ok, hopefully this is how you envisioned animation with the timeline, I haven't found another way, but please let me know if another setup is possible.

 so you have an Animation curve, inside an animator Controller, used on a timeline track.




now to hook this up to a PlayMaker float:

the animation curve targets a public float on a new proxy called PlayMakerFloatVariableProxy, which lets Unity or any system control a public float value, and the proxy simply hook it up to an FsmFloat of your choice like so:



notice the FloatValue field of the proy turned blue because it is now a target of the animation curve.

and the complete setup is now animating an FsmFloat






I have attached the package for this, the sample is in PlayMaker Custom Samples/timeline/timeline Test/

Let me know how it goes, if this is good, I'll clean up and distribute. The good thing about this is that this proxy is applicable for anything, any system can control this float variable and it will be reflected to the target FsmFloat.


Bye,

 Jean