playMaker

Author Topic: Can you tell playmaker which FSM gets run first?  (Read 1524 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Can you tell playmaker which FSM gets run first?
« on: May 25, 2014, 04:15:25 PM »
So let's say I have 2 managers (audio and video).  They get run at the same time, but oviously the computer picks 1 to start first.  So the events in 1 will happen first.  Is there a way playmaker can mark one to run first?  That way I could have the audio manager run first before the video manager.

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Can you tell playmaker which FSM gets run first?
« Reply #1 on: May 25, 2014, 04:41:13 PM »
yes one could have a start state that does absolutely nothing and could be sent to it's next state by an FSM on another object. Using a Custom Global Event is one way to do this.
« Last Edit: May 25, 2014, 04:48:18 PM by redikann »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Can you tell playmaker which FSM gets run first?
« Reply #2 on: May 26, 2014, 12:58:18 AM »
This is good advice. Unity does not make any guarantees about the order in which components are called, so if you need to guarantee an order it's good to chain the FSMs the way redikann describes.