- Home /
Question by
Ludeme Games · Oct 08, 2012 at 05:15 AM ·
networkingphotoncallback
Callback handling all PhotonNetworkingMessages
For the Unity version of PhotonCloud is there a callback that handles all incoming messages for the enum PhotonNetworkingMessage? For example, in a MonoBehavior instead of...
void OnJoinedRoom() {
Debug.Log("Photon: OnJoinedRoom()");
}
repeat for every single type of message (with no forward compatibility)...
I want this or equivalent...
void OnPhotonNetworkingMessgage(PhotonNetworkingMessage messageType) {
Debug.Log("Photon: " + messageType.ToString());
}
Comment
Ideally, I'd like to monitor all inco$$anonymous$$g and outgoing data as well.
Ludeme: That's a different topic. Go ahead and post it ;)
Answer by tobiass · Oct 12, 2012 at 08:12 AM
NetworkingPeer.SendMonoMessage is always used to call the different PhotonNetworkingMessage implementations. It should be easy to modify this and call your single method instead.
Your answer
![](https://koobas.hobune.stream/wayback/20220613082031im_/https://answers.unity.com/themes/thub/images/avi.jpg)