Created
February 29, 2024 09:11
-
-
Save dimmduh/1c21cb84a18951757e230f81704670cd to your computer and use it in GitHub Desktop.
Debug Log Unity Photon Pun Callback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using ExitGames.Client.Photon; | |
using Photon.Pun; | |
using Photon.Realtime; | |
using UnityEngine; | |
using Hashtable = ExitGames.Client.Photon.Hashtable; | |
public class z_DebugPunCallbacks : MonoBehaviourPunCallbacks | |
{ | |
public override void OnConnected() | |
{ | |
Debug.Log("OnConnected"); | |
} | |
public override void OnLeftRoom() | |
{ | |
Debug.Log("OnLeftRoom"); | |
} | |
public override void OnMasterClientSwitched(Player newMasterClient) | |
{ | |
Debug.Log("OnMasterClientSwitched " + newMasterClient); | |
} | |
public override void OnCreateRoomFailed(short returnCode, string message) | |
{ | |
Debug.Log("OnCreateRoomFailed " + returnCode + " " + message); | |
} | |
public override void OnJoinRoomFailed(short returnCode, string message) | |
{ | |
Debug.Log("OnJoinRoomFailed " + returnCode + " " + message); | |
} | |
public override void OnCreatedRoom() | |
{ | |
Debug.Log("OnCreatedRoom"); | |
} | |
public override void OnJoinedLobby() | |
{ | |
Debug.Log("OnJoinedLobby"); | |
} | |
public override void OnLeftLobby() | |
{ | |
Debug.Log("OnLeftLobby"); | |
} | |
public override void OnDisconnected(DisconnectCause cause) | |
{ | |
Debug.Log("OnDisconnected " + cause); | |
} | |
public override void OnRegionListReceived(RegionHandler regionHandler) | |
{ | |
Debug.Log("OnRegionListReceived " + regionHandler); | |
} | |
public override void OnRoomListUpdate(List<RoomInfo> roomList) | |
{ | |
Debug.Log("OnRoomListUpdate " + roomList.Count); | |
} | |
public override void OnJoinedRoom() | |
{ | |
Debug.Log("OnJoinedRoom"); | |
} | |
public override void OnPlayerEnteredRoom(Player newPlayer) | |
{ | |
Debug.Log("OnPlayerEnteredRoom " + newPlayer); | |
} | |
public override void OnPlayerLeftRoom(Player otherPlayer) | |
{ | |
Debug.Log("OnPlayerLeftRoom " + otherPlayer); | |
} | |
public override void OnJoinRandomFailed(short returnCode, string message) | |
{ | |
Debug.Log("OnJoinRandomFailed " + returnCode + " " + message); | |
} | |
public override void OnConnectedToMaster() | |
{ | |
Debug.Log("OnConnectedToMaster"); | |
} | |
public override void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) | |
{ | |
Debug.Log("OnRoomPropertiesUpdate " + propertiesThatChanged); | |
} | |
public override void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) | |
{ | |
Debug.Log("OnPlayerPropertiesUpdate " + targetPlayer + " " + changedProps); | |
} | |
public override void OnFriendListUpdate(List<FriendInfo> friendList) | |
{ | |
Debug.Log("OnFriendListUpdate " + friendList.Count); | |
} | |
public override void OnCustomAuthenticationResponse(Dictionary<string, object> data) | |
{ | |
Debug.Log("OnCustomAuthenticationResponse " + data); | |
} | |
public override void OnCustomAuthenticationFailed(string debugMessage) | |
{ | |
Debug.Log("OnCustomAuthenticationFailed " + debugMessage); | |
} | |
public override void OnWebRpcResponse(OperationResponse response) | |
{ | |
Debug.Log("OnWebRpcResponse " + response); | |
} | |
public override void OnLobbyStatisticsUpdate(List<TypedLobbyInfo> lobbyStatistics) | |
{ | |
Debug.Log("OnLobbyStatisticsUpdate " + lobbyStatistics.Count); | |
} | |
public override void OnErrorInfo(ErrorInfo errorInfo) | |
{ | |
Debug.Log("OnErrorInfo " + errorInfo); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment