just a script lol
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using Photon.Realtime;
using TMPro;
public class Roomdata : MonoBehaviourPunCallbacks
{
public override void OnJoinedRoom()
{
this.GetComponent<TextMeshProUGUI>().text = PhotonNetwork.CurrentRoom.PlayerCount.ToString();
}
public override void OnLeftRoom()
{
this.GetComponent<TextMeshProUGUI>().text = "not in a room!";
}
public override void OnPlayerLeftRoom(Player otherPlayer)
{
this.GetComponent<TextMeshProUGUI>().text = PhotonNetwork.CurrentRoom.PlayerCount.ToString();
}
public override void OnPlayerEnteredRoom(Player newPlayer)
{
this.GetComponent<TextMeshProUGUI>().text = PhotonNetwork.CurrentRoom.PlayerCount.ToString();
}
}