"TanksMP.Player does not." Error

  • Hello,
    I set up the game with youtube video and document. It's working, the game is running but have an error when 2 tanks or more in the scene (TDM or CTF). I use Unity 2019.1.7f1.

    Observed scripts have to implement IPunObservable. TankFree(Clone) (TanksMP.Player) does not. It is Type: TanksMP.Player
    UnityEngine.Debug:LogError(Object, Object)
    Photon.Pun.PhotonView:SerializeComponent(Component, PhotonStream, PhotonMessageInfo) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:367)
    Photon.Pun.PhotonView:SerializeView(PhotonStream, PhotonMessageInfo) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:329)
    Photon.Pun.PhotonNetwork:OnSerializeWrite(PhotonView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1520)
    Photon.Pun.PhotonNetwork:RunViewUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1449)
    Photon.Pun.PhotonHandler:LateUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:132)

    How can i fix that?

  • Hi,

    good catch. I didn't notice since the game and hit registration still worked as expected in my release tests. To fix it:

    Add to the end of line 17, Player.cs:

    , IPunObservable

    Insert namespace to method at line 186, Player.cs:


    Interestingly enough I have found an issue on the master client not resetting health on death (other clients are fine), which could be related to this. I will investigate this on my return.

  • Hi @Baroni thank you for your answer.. You said Player.cs but we have 2 Player.cs files.. One of them in Tanks Multiplayer, the other one in PhotonRealtime.. I think ı should to be change in Tanks Multiplayer's Player.cs. But it is not possible to write codes at Lines 17 and 186.




  • Yes, I meant the one in our asset. Unfortunately I am not able to open your screenshots.

    alt text

    alt text

    Please note that I am out of office, starting today, for the following week, with infrequent or no internet access.

  • Thanks @Baroni.. No longer gives an error.. By the way it's perfect asset..:)

Log in to reply