Photonnetwork check when somebody connects/disconnects

Hello there.

I am working on a multiplayer FPS with PhotonNetwork and I want to have some info updated everytime somebody connects or disconnects.

Are there any functions about that?? I searched at Photon’s documentation but found nothing :confused:

What photon service you are using? in Photon PUN (photon unity networking) you can check it like below

public void OnPhotonPlayerConnected(PhotonPlayer player)
	{
		Debug.Log ("Player Connected "+ player.name);
    }


public void OnPhotonPlayerDisconnected(PhotonPlayer player)
	{	
                Debug.Log ("Player Disconnected "+ player.name);
	}

for more info check PhotonNetwork Class Reference

Well, if anyone has this problem I did find the solution.

public override void OnDisconnected(DisconnectCause cause)
{
    base.OnDisconnected(cause);
    Debug.LogWarning($"Player disconnected: {cause}");
}