コード例 #1
0
    private void CreateRoomListing(RoomInfo roomInfo)
    {
        GameObject roomListing = Instantiate(roomListingTemplate.gameObject) as GameObject;

        roomListing.transform.SetParent(roomListingContainer, false);
        roomListing.gameObject.SetActive(true);

        RoomListing roomScript = roomListing.GetComponent <RoomListing>();

        roomScript.Initialize(roomInfo.Name, this);

        roomScript.ShowOccupants(roomInfo.PlayerCount);

        allRooms.Add(roomScript);
    }