WinterJamSnowman/Assets/Runtime/Networking/RoomCodeDisplay.cs

20 lines
374 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class RoomCodeDisplay : MonoBehaviour {
public TextMeshProUGUI Text;
void Start() {
if (NetworkManager.inRoom){
gameObject.SetActive(true);
Text.text = NetworkManager.net.CurrentRoom.Name;
} else {
gameObject.SetActive(false);
}
}
}