Event called twice! WHY?
Options
Hello, I have a Problem with Events. They are calling twice!
(This code in Room script)
In Awake I do event callback :
In Start I send event to Master Client
but I leave room and disconnect Photon(using this code).
and then again connect to Server(without restart game) and create room and THIS EVENT CALLING TWICE!! (
(This code in Room script)
In Awake I do event callback :
PhotonNetwork.OnEventCall += OnEvent;
In Start I send event to Master Client
RaiseEventOptions rs = new RaiseEventOptions(); rs.Receivers = ReceiverGroup.MasterClient; PhotonNetwork.RaiseEvent(0, 0, true, rs);In OnEvent I got this by 0 eventCode
if (!PhotonNetwork.isMasterClient) return; //Something codeFirst time events work right,
but I leave room and disconnect Photon(using this code).
PhotonNetwork.Disconnect();
and then again connect to Server(without restart game) and create room and THIS EVENT CALLING TWICE!! (
//Something
code run twice!). How to fix? 0
Comments
-
0
-
Okay but here I got more information0