> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 검색 가능한 로비 만들기

> PlayFab Lobby에서 검색 키와 검색 가능한 문자열 또는 숫자 속성을 정의하여 플레이어가 공개 게임 세션을 효율적으로 필터링하고 발견할 수 있게 합니다.

이 문서에서는 검색 가능한 로비를 만드는 방법에 대해 설명합니다.

로비를 검색 가능하게 만들려면 액세스 정책이 **Public** 또는 \_\_Friends\_\_여야 합니다. **Private** 액세스 정책이 있는 로비는 검색 쿼리로 참여할 수 없으며 [초대](/services/playfab/multiplayer/lobby/lobby-invites)를 통해 참여해야 합니다. 로비를 처음 만들 때 이 액세스 정책을 구성하는 것이 일반적입니다.

로비의 액세스 정책이 올바르게 설정되면, 다른 플레이어는 [로비 찾기](/services/playfab/multiplayer/lobby/find-lobbies)를 사용하여 검색할 수 있습니다.

또한, 로비 소유자는 다른 플레이어가 더 구체적인 결과를 찾기 위해 로비 검색 시 사용할 수 있는 사용자 지정 검색 속성을 정의할 수 있습니다.

자세한 내용은 [로비 찾기](/services/playfab/multiplayer/lobby/find-lobbies) 및 [로비 참여](/services/playfab/multiplayer/lobby/join-lobbies)를 참조하세요.

## Lobby and Matchmaking SDK를 사용하여 검색 속성을 설정하는 예제

이 예제에서, 생성된 로비에는 다음과 같은 사용자 지정 검색 속성이 정의되어 있습니다.

* Game mode = "DeathMatch"
* Competition style = "Ranked"
* Skill level = 로비를 만든 사람의 스킬 레벨

```cpp theme={null}
static PFMultiplayerHandle g_pfmHandle; // initialized elsewhere

#define PFLOBBY_SEARCH_KEY_GAME_MODE "string_key1"
#define PFLOBBY_SEARCH_KEY_COMPETITION_STYLE "string_key2"
#define PFLOBBY_SEARCH_KEY_SKILL "number_key1"

#define GAME_MODE_DEATH_MATCH "DeathMatch"
#define COMPETITION_STYLE_RANKED "Ranked"

PFEntityKey m_localUser;
namespace MyGame {
    uint32_t GetPlayerSkill(); // defined elsewhere
}

void CreateLobbyWithSearchProperties()
{
    // Initialize the lobby configuration with search properties
    std::string playerSkill = std::to_string(MyGame::GetPlayerSkill());

    const char* searchPropertyKeys[] = {
        PFLOBBY_SEARCH_KEY_GAME_MODE,
        PFLOBBY_SEARCH_KEY_COMPETITION_STYLE,
        PFLOBBY_SEARCH_KEY_SKILL,
    };

    const char* searchPropertyValues[_countof(searchPropertyKeys)] = {
        GAME_MODE_DEATH_MATCH,
        COMPETITION_STYLE_RANKED,
        playerSkill.c_str(),
    };

    PFLobbyCreateConfiguration lobbyConfiguration{};
    lobbyConfiguration.maxMemberCount = 16;
    lobbyConfiguration.searchPropertyCount = _countof(searchPropertyKeys);
    lobbyConfiguration.searchPropertyKeys = searchPropertyKeys;
    lobbyConfiguration.searchPropertyValues = searchPropertyValues;

    // Initialize an empty join configuration. This can be optionally initialized with the creator's member properties 
    PFLobbyJoinConfiguration creatorMemberConfiguration{};
    creatorMemberConfiguration.memberPropertyCount = 0;

    // Create and join the lobby
    PFLobbyHandle lobby;
    HRESULT hr = PFMultiplayerCreateAndJoinLobby(
        g_pfmHandle,
        &m_localUser,
        &lobbyConfiguration,
        &creatorMemberConfiguration,
        nullptr,
        &lobby);
}
```

## 참고

* [로비 찾기](/services/playfab/multiplayer/lobby/find-lobbies)
* [Lobby properties](/services/playfab/multiplayer/lobby/lobby-properties)
* [Owner requirements and privileges](/services/playfab/multiplayer/lobby/owner-requirements-and-privileges)
* [로비 만들기](/services/playfab/multiplayer/lobby/create-a-lobby)


## Related topics

- [로비 만들기](/ko/services/playfab/multiplayer/lobby/create-a-lobby.md)
- [로비 찾기](/ko/services/playfab/multiplayer/lobby/find-lobbies.md)
- [로비 참여](/ko/services/playfab/multiplayer/lobby/join-lobbies.md)
- [Lobby SDK 빠른 시작](/ko/services/playfab/multiplayer/lobby/lobby-getting-started.md)
- [Economy(레거시)에서의 시간 제한 소모품](/ko/services/playfab/economy-monetization/economy/tutorials/timed-consumables.md)
