Page 1 of 1

Saving a playmaker FSM component

Posted: Mon Jan 09, 2017 2:53 am
by Sanguinius
I know you can use the "save all" method within playmaker to save all the FSM variables, but are you able to manually save the entire FSM component using a script?

I'm attempting to save both the transform and the FSM component. The transform is easy to save, but I don't know how to properly grab the FSM.
You usually do something like:

Code: Select all

Transform t = obj.GetComponent<Transform>();
ES2.Save(t, file+"?tag=transform");
ES2.Load<Transform>(file+"?tag=transform", t);
But how can you get that objects FSM? I was thinking something like:

Code: Select all

FsmVariables f = obj.GetComponent<FsmVariables>();
But I haven't made much progress with it.
(Just to be a bit more clear i'm trying to save this with all the variables set inside http://prntscr.com/dt88s5)

Thank you.

Re: Saving a playmaker FSM component

Posted: Mon Jan 09, 2017 7:36 am
by Joel
Hi there,

Unfortunately this is not a question we can answer as it depends on how they've implemented the class at their end. You're best off asking this on the Playmaker forums as they should have information on what fields need to be serialised to persist their classes.

All the best,
Joel

Re: Saving a playmaker FSM component

Posted: Mon Jan 09, 2017 8:21 am
by Sanguinius
Alright thank you.