Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ViRiX Dreamcore on February 11, 2017, 04:35:41 PM

Title: Animate a PlayMaker variable with the Unity Animation tool
Post by: ViRiX Dreamcore on February 11, 2017, 04: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.
Title: Re: Animate a PlayMaker variable with the Unity Animation tool
Post by: jeanfabre on February 13, 2017, 02: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
Title: Re: Animate a PlayMaker variable with the Unity Animation tool
Post by: frogwise on December 03, 2017, 11: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.
Title: Re: Animate a PlayMaker variable with the Unity Animation tool
Post by: jeanfabre on December 04, 2017, 02: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
Title: Re: Animate a PlayMaker variable with the Unity Animation tool
Post by: frogwise on December 10, 2017, 12:24:37 AM
Ping! :)
Title: Re: Animate a PlayMaker variable with the Unity Animation tool
Post by: jeanfabre on December 12, 2017, 03:49:07 AM
Hi,

 Thanks I need the pings :)

 bye,

 Jean
Title: Re: Animate a PlayMaker variable with the Unity Animation tool
Post by: jeanfabre on December 12, 2017, 04: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.

(https://i.imgur.com/wRloPmQ.png)
(https://i.imgur.com/bpTjZpm.png)

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:

(https://i.imgur.com/zmN2fH7.png)

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


(https://i.imgur.com/9LnXwaE.gif)



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