Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Ragtag Shawn on January 08, 2016, 06:50:19 PM
-
I need to crawl through my project's PM components and modify parameter values in specific actions in prefab assets and in scenes via an editor script. I know how to do editor scripts, I am just having trouble accessing the list of actions in the FsmState object. The Actions property is always null even though I know the state has actions.
The console reports the following error:
get_actions: Fsm not initialized: Wait
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.FsmState:get_Actions()
Anybody got a working example of doing this that can get me started?
Thanks,
Shawn
-
I think I figured it out.
Call Fsm.InitData before accessing the action list. After modifying the parameters use FsmState.SaveActions to force it to serialize to the asset.
-
That should do it. Good sleuthing :)