playMaker

Author Topic: PUN2 GO-level framework question  (Read 93 times)

GR00V3R

  • Playmaker Newbie
  • *
  • Posts: 12
    • View Profile
PUN2 GO-level framework question
« on: March 10, 2021, 07:43:24 PM »
Hi there. I'm hoping someone here can tell me what is structurally wrong with my PUN2 instantiated game object (a ship), as shown in the screenshot attached.  :)

I was seeing the error shown below, that my FSM did not have IPunObservable implemented, so I attached the Play Maker Photon View script and ensured Photon View was observing it (along with the FSM with variables I'm syncing) in this understanding the this is why Play Maker Photon View exists:

Code: [Select]
Observed scripts have to implement IPunObservable. PLAYER2_MP (PlayMakerFSM) does not. It is Type: PlayMakerFSM
UnityEngine.Debug:LogError (object,UnityEngine.Object)
Photon.Pun.PhotonView:SerializeComponent (UnityEngine.Component,Photon.Pun.PhotonStream,Photon.Pun.PhotonMessageInfo) (at D:/Unity Projects/PROJECT/Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:633)
Photon.Pun.PhotonView:SerializeView (Photon.Pun.PhotonStream,Photon.Pun.PhotonMessageInfo) (at D:/Unity Projects/PROJECT/Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:593)
Photon.Pun.PhotonNetwork:OnSerializeWrite (Photon.Pun.PhotonView) (at D:/Unity Projects/PROJECT/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1721)
Photon.Pun.PhotonNetwork:RunViewUpdate () (at D:/Unity Projects/PROJECT/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1650)
Photon.Pun.PhotonHandler:LateUpdate () (at D:/Unity Projects/PROJECT/Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:173)

Specifically, this error evidences itself by having the Not Mine clone on the Master side instantiating in a deactivated state.

Looking at the Play Maker Photon View Proxy code, it looked like that was perhaps the missing element, but with that script attached the instantiation failed completely.

I'm been at this for about a day trying to unravel what's going on and why it's not working as expected, but I'm at a loss.

Any and all insight or advice greatly appreciated. Looking forward to your responses. :)

GR00V3R

  • Playmaker Newbie
  • *
  • Posts: 12
    • View Profile
Re: PUN2 GO-level framework question
« Reply #1 on: March 12, 2021, 09:09:42 PM »
UPDATE
So it looks like the Play Maker Photon View script was the culprit here. I've removed that script and the error is no longer appearing; also, the network updates appear to be working as intended without it, so apparently that script is unnecessary in this context.

If anyone can elaborate as to the whys and wherefores, that would be much appreciated.  :)