playMaker

Author Topic: Photon RPC Broadcast Target FSM[SOLVED]  (Read 228 times)

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 588
    • View Profile
    • Car and Traffic Playmaker assets
Photon RPC Broadcast Target FSM[SOLVED]
« on: January 17, 2019, 04:58:06 PM »
Hello,
I am trying to target a specific scene game object's FSM as RPC target. I understand it can not reference an object directly. Tried adding Photon View and proxy, also instantiate the object similar as players, still getting the error.
Profiler shows that RPC broadcast all events are creating CPU spikes and now researching a way to send them directly to the manager, which deals all the RPC.
How those dropdown options are intended to be used (target as gameobj or FSM), any tips appreciated.

Thanks!



(Photon Classic)
error:
Code: [Select]
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.PhotonViewRpcBroadcastFsmEvent.DoREC () (at Assets/PlayMaker PUN/Actions/PhotonViewRpcBroadcastFsmEvent.cs:94)
HutongGames.PlayMaker.Actions.PhotonViewRpcBroadcastFsmEvent.OnEnter () (at Assets/PlayMaker PUN/Actions/PhotonViewRpcBroadcastFsmEvent.cs:44)
HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState.OnEnter () (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2695)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2642)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2570)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2711)
HutongGames.PlayMaker.Fsm.Update () (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1934)
PlayMakerFSM.Update () (at C:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:539)
« Last Edit: January 18, 2019, 12:45:01 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14035
  • Official Playmaker Support
    • View Profile
Re: Photon RPC Broadcast Target FSM
« Reply #1 on: January 18, 2019, 12:44:47 AM »
Hi,

 yes, this is a problem indeed, because I can't show a custom field for this, and so this actio only accept Self or BroadcastAll as options for Event Target.

 I have modified the action so that it errors out inside the action if you are not using the right one, at least you will not waiste time on this. Sorry about that.

so the likely option for you is to choose Self.

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14035
  • Official Playmaker Support
    • View Profile
Re: Photon RPC Broadcast Target FSM[SOLVED]
« Reply #2 on: January 18, 2019, 01:07:02 AM »
Hi,

 a new version is up on the ecosystem, with this new error checking to prevent this kind of time waiste :)

 Bye,

 Jean

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 588
    • View Profile
    • Car and Traffic Playmaker assets
Re: Photon RPC Broadcast Target FSM[SOLVED]
« Reply #3 on: January 18, 2019, 03:01:48 AM »
Hi, ok got it, thank you Jean :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14035
  • Official Playmaker Support
    • View Profile
Re: Photon RPC Broadcast Target FSM[SOLVED]
« Reply #4 on: January 18, 2019, 03:54:02 AM »
Hi,

 ok, keep up the great work with Flashing light, I hope it's going well for you!

Bye,

 Jean