public MatchRoom CreateMatchRoom(int roomIndex, string roomName, int maxPlayerNumber, int matchMap, string matchType, GameUserPlayer creator) { matchRoom = GameObject.Instantiate(matchRoomPrefab, Vector3.zero, Quaternion.identity) as MatchRoom; matchRoom.matchMap = matchMap; matchRoom.matchType = matchType; matchRoom.GetComponent<Room>().roomIndex = roomIndex; matchRoom.GetComponent<Room>().roomName = roomName; matchRoom.GetComponent<Room>().maxPlayerNumber = maxPlayerNumber; matchRoom.GetComponent<Room>().creator = creator; matchRoom.name = matchRoom.GetComponent<Room>().roomIndex.ToString(); matchRoom.transform.parent = gameObject.transform; return matchRoom; }