Hey Guys,
When I try to broadcast an event to every FSM in the level I'm finding i get errors that kill performance.
Here is what unity outputs:
"NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.FsmState.OnEnter ()
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)
HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal)
HutongGames.PlayMaker.Fsm.ChangeState (System.String eventName)
HutongGames.PlayMaker.Fsm.Event (System.String fsmEventName)
HutongGames.PlayMaker.Actions.BroadcastEvent.BroadcastToAll () (at Assets/PlayMaker/Actions/BroadcastEvent.cs:60)"
And when i double click the error it highlights this line of code:
fsm.Event(broadcastEvent.Value);
Are there any issues with broadcasting events i should be aware of?
Is there a better way of destroying all instances of an object at once?