private void clearLobbyItem() { if (lobbyItem != null) { GameObject.Destroy(lobbyItem.gameObject); lobbyItem = null; } }
private LobbyRoomItem GetLobbyItem() { if (lobbyItem == null) { lobbyItem = ResourceManager.Instance.Load <LobbyRoomItem>("Prefabs/LobbyRoomItem.prefab"); lobbyItem.transform.SetParent(SceneManager.Instance.Lobby.roomList, false); lobbyItem.SetRoomId(RoomId); } return(lobbyItem); }