playMaker

Author Topic: Fsm not initialized when accessing info at editor time [SOLVED]  (Read 1060 times)

starseeker

  • Playmaker Newbie
  • *
  • Posts: 2
Hello, I'm wondering if anyone has any solutions for accessing PlayMaker instances at editor time.

We have an in-house tool that analyzes Unity assets, scenes, and prefabs. With our extensive and complex use of PlayMaker, I was hoping to build out some PlayMaker analysis as well to make sure our custom actions are initialized properly.

However, when I try to access the Actions on the Fsm instance, I end up with an error like the following:

Code: [Select]
get_actions: Fsm not initialized: Wait for Initialization
I have found that if I run Preprocess() on PlayMakerFSM objects, this will initialize the FSM and work around this issue.
(I also record and undo any changes to the FSM that this may cause)

However, I'm wondering if anyone has any tips for editor-time analysis on FsmTemplate objects, which don't have Preprocess.

It would also be great if this could be more supported by the plugin, I'm having to do some really weird things here :-\
« Last Edit: April 27, 2022, 12:11:37 PM by starseeker »

starseeker

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Fsm not initialized when accessing info at editor time
« Reply #1 on: April 26, 2022, 04:20:29 PM »
In case anyone else runs into this:

Run Reinitialize() on the Fsm before accessing its properties.

Wish I had known about this before.