Event is called twice to the second player
Options
Event is called twice to the second player
must be called once
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) { } }
0
Comments
-
Hi @Kurtav,
can you confirm, that you use RaiseEvent just once? Maybe you are calling it on both clients at the same time?0 -
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 said:Hi @Kurtav,
can you confirm, that you use RaiseEvent just once? Maybe you are calling it on both clients at the same time?0 -
@Christian_Simon
Yes you are right. Error in my project )0