using TMPro; using UnityEngine; namespace LobbyRelaySample.UI { /// /// Read Only input field (for copy/paste reasons) Watches for the changes in the lobby's Relay Code /// public class RelayCodeUI : ObserverPanel { [SerializeField] TMP_InputField relayCodeText; public override void ObservedUpdated(LobbyData observed) { if (!string.IsNullOrEmpty(observed.RelayCode)) { relayCodeText.text = observed.RelayCode; Show(); } else { Hide(); } } } }