problem with OnEvent()
Options
Hello,
i am try to understand how photon network works with unity and find some problem with using RaiseEvent.
i am using
To create my event, and catch it by
But all i get is error that
Unhandled Event: 1
So, what i am doing wrong? Thanks!
i am try to understand how photon network works with unity and find some problem with using RaiseEvent.
i am using
PhotonNetwork.RaiseEvent(eventcode, datatosend, sendrelaibale, RaiseEventOptions.Default);
To create my event, and catch it by
void OnEvent(EventData mevent){...}
But all i get is error that
Unhandled Event: 1
So, what i am doing wrong? Thanks!
0
Comments
-
Hi,
PhotonNetwork.RaiseEvent method comment contains detailed info on event usage (go to method definition in ide or check PhotonNetwork.cs to see full info):
/// To receive the events someone sends, register your handling method in PhotonNetwork.OnEventCall.
///
/// Example:
/// private void OnEventHandler(byte eventCode, object content, PhotonPlayer sender)
/// { Debug.Log("OnEventHandler"); }
///
/// PhotonNetwork.OnEventCall += this.OnEventHandler;
....0