playMaker

Author Topic: convert FSM to script [SOLVED]  (Read 2904 times)

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
convert FSM to script [SOLVED]
« on: June 07, 2014, 07:23:51 PM »
Hi,
Once a FSM is created on a gameObject, is there a way to convert it into a regular C# or java script ? So its FSM would be replaced by its equivalent script component ...
I've tried to find the answer in the manual without success.
Thanks
Alain
« Last Edit: June 07, 2014, 09:03:11 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: convert FSM to script
« Reply #1 on: June 07, 2014, 08:04:53 PM »
No, there's no way to do that. A PlayMakerFSM is a script component (MonoBehaviour) that stores an FSM as data. Converting that to a standalone script would be complicated... and generally that kind of machine generated code is not very easy to read/edit!

However actions are regular scripts that are run by the FSM framework and are very easy to read/edit/create. The system is a high level framework (FSM) used to organize low level code (Actions). The idea is that it's easier to edit, maintain and debug than a single monolithic script...

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: convert FSM to script
« Reply #2 on: June 07, 2014, 08:22:11 PM »
Thanks for your fast and accurate answer !