您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
26 行
658 B
26 行
658 B
using TMPro;
|
|
|
|
namespace LobbyRelaySample.UI
|
|
{
|
|
/// <summary>
|
|
/// Read Only input field (for copy/paste reasons) Watches for the changes in the lobby's Room Code
|
|
/// </summary>
|
|
public class RoomCodeUI : ObserverPanel<LobbyData>
|
|
{
|
|
public TMP_InputField roomCodeText;
|
|
|
|
public override void ObservedUpdated(LobbyData observed)
|
|
{
|
|
if (!string.IsNullOrEmpty(observed.RoomCode))
|
|
{
|
|
roomCodeText.text = observed.RoomCode;
|
|
Show();
|
|
}
|
|
else
|
|
{
|
|
Hide();
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|