playMaker

Author Topic: Photon PUN 2 build  (Read 773 times)

alphgrph

  • Playmaker Newbie
  • *
  • Posts: 2
Photon PUN 2 build
« on: May 13, 2020, 06:46:09 PM »
Hi, I am just learning how to integrate PUN 2 with Playmaker (which is such a great tool), and I've run into an issue that I'm not sure how to solve.

In my simple test scene, I instantiate characters - these can click on a central object that animates and gives them points, they can right click to instantiate trees and objects. They can also send messages to a 'chat bot' along with their player name.

This all works fine and both players can see each other, send messages and place objects across the network from editor to build, but the issue comes with having a textmesh name hovering above the players that is included in the player prefab that is instantiated. I'm using isMine to control all the player FSMs of course.

When I build the game, the build player will simply not return a name nor network ID, whether they are master or not. The player in the editor will always do this, and seems to work as intended, no matter whether it is master or not. Clearly they are connecting so this is strange to me.

I am however, getting the following repeated messages:

Observed scripts have to implement IPunObservable. MyPlayer(Clone) (PlayMakerFSM) does not. It is Type: PlayMakerFSM
UnityEngine.Debug:LogError(Object, Object)
Photon.Pun.PhotonView:SerializeComponent(Component, PhotonStream, PhotonMessageInfo) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:368)
Photon.Pun.PhotonView:SerializeView(PhotonStream, PhotonMessageInfo) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:330)
Photon.Pun.PhotonNetwork:OnSerializeWrite(PhotonView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1593)
Photon.Pun.PhotonNetwork:RunViewUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1522)
Photon.Pun.PhotonHandler:LateUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:155)

I have all my FSMs observable, and have given every object a base synch FSM created with the wizard, so I'm not sure why it would be throwing this error - which it does both for my instantiated player prefab and my instantiated player canvas. As I say, the game and connection seems to be working ok apart from this issue. Could this error be given by my isMine switching off something that another FSM is looking for? But why might this affect the build differently?

Any thoughts would be much appreciated!

Thanks,
Luke