recv event but call back on client is not triggered

edited May 2021 in Photon Bolt
In the Unity log, I can see that the event (will refer to as event A) has been received:
recv event [ChangeControlEvent actorID=2 getControl=True countDown=60]

However the corresponding call back in "NetworkCallbacks.cs" was not triggered on the client (no printing of 111 or 222). It has no problem on the other client which plays as server though.
public override void OnEvent(ChangeControlEvent evnt)
        if (evnt.actorID == actorIDself)

My game works well before I added some codes that adds new events (will refer to as event B), and new tokens.
If event B is not triggered, then event A works well. If event B is triggered then the problem above appears. (Event B seems works fine too)

I spent lots of time debugging it, but can't find where the problem is. What could possibly cause this problem? Thanks!


  • Update: not only Event A stops being triggered, but all other following events stop too. Sending event still works.
  • OK, problem solved. I commented out block by block, line by line, and after about over 10 to 20 builds, I found the inconsistency of a Token. In Read I use ReadByte() but in Write I use WriteInt().