Event is called twice to the second player

Event is called twice to the second player
must be called once
private readonly byte MoveUnitsToTargetPositionEvent = 0;
void Awake()
{
	PhotonNetwork.OnEventCall += EventNetworkMoveChess;
}

public void NetworkMoveChess()
{
	RaiseEventOptions raiseEventOptions = new RaiseEventOptions { Receivers = ReceiverGroup.All }; 
	PhotonNetwork.RaiseEvent(MoveUnitsToTargetPositionEvent, null, true, raiseEventOptions);
}

public void EventNetworkMoveChess(byte eventCode, object content, int senderId)
{
	if (eventCode == MoveUnitsToTargetPositionEvent)
	{
                
	}
}

Comments

  • Hi @Kurtav,

    can you confirm, that you use RaiseEvent just once? Maybe you are calling it on both clients at the same time?
  • Kurtav
    Kurtav ✭✭
    edited October 2018

    Hi @Kurtav,
    can you confirm, that you use RaiseEvent just once? Maybe you are calling it on both clients at the same time?

    You want to say that this is not a PUN error but the error of my project? I’ll check and create an empty project with an example of RaiseEvent .
  • @Christian_Simon
    Yes you are right. Error in my project )