Saving a playmaker FSM component
Posted: Mon Jan 09, 2017 2:53 am
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:
But how can you get that objects FSM? I was thinking something like:
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.
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);
Code: Select all
FsmVariables f = obj.GetComponent<FsmVariables>();
(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.