기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Multiplayer Services SDK

All Services

Multiplayer Services SDK

이 페이지는 선택한 언어로 제공되지 않습니다.
Multiplayer
​
​
Multiplayer Services SDK
  • Overview
  • Get started
  • Use multiplayer sessions
  • Manage sessions
  • Connect players through a relay
  • Networking
  • Matchmaking
    • Get started with matchmaking
    • Manage and configure matchmaking
      • Matchmaking rules
      • Matchmaking rule relaxation
      • Matchmaking with Quality of Service
      • Player segmentation
      • Matchmaker backfill
      • Matchmaking rule samples
      • Matchmaker A/B testing
    • Matchmaker troubleshooting
    • Integrations with other UGS services
    • Deploy Matchmaker configurations
  • Monitor and debug sessions
  • Tutorials
  • Reference
  1. Multiplayer Services SDK

Rules Sample

Apply example matching rules for common game scenarios like one-versus-one, team-based, and asymmetrical matches.
읽는 시간 5분
최근 업데이트: 15일 전

Here are some examples of rules that can be used to create different types of matches.

1v1

{ "Name": "1v1", "BackfillEnabled": false, "MatchDefinition": { "Teams": [ { "Name": "Teams", "TeamCount": { "Min": 2, "Max": 2 }, "PlayerCount": { "Min": 1, "Max": 1 } } ] }}
The following code is an example of ticket and player data.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "swsqozxo6qxm9fmm38khh3tddv35", "customData": {} }]}

QoS is equivalent for all the players in the match

{ "Name": "1v1", "MatchDefinition": { "Teams": [ { "Name": "Teams", "TeamCount": { "Min": 2, "Max": 2 }, "PlayerCount": { "Min": 1, "Max": 1 } } ], "MatchRules": [ { "Name": "QoS", "Type": "Difference", "Source": "Players.QosResults.Latency", "Reference": 20, "Not": false, "EnableRule": true } ] }, "BackfillEnabled": false}
The following code is an example of ticket and player data.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "w4505uhp7ohr27di0ob9qdncaq5b", "customData": {}, "qosResults":[ { "regionId": "61dd5b48-d24c-11ed-afa1-0242ac120002", "packetLoss": 0.8, "latency": 50 }, { "regionId": "cf32c6e1-46ff-4904-9a37-359fc66bf382", "packetLoss": 0.0, "latency": 10 } ] } ]}

5v5, Team Red vs Team Blue

The following code includes two different teams. Players must have chosen the team they want to play in.
{ "Name": "5v5 - Red vs Blue", "MatchDefinition": { "Teams": [ { "Name": "Team Red", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 5, "Max": 5 }, "TeamRules": [ { "Name": "Team Red", "Type": "Equality", "Source": "Players.CustomData.Team", "Reference": "Red", "Not": false, "EnableRule": true } ] }, { "Name": "Team Blue", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 5, "Max": 5 }, "TeamRules": [ { "Name": "Team Blue", "Type": "Equality", "Source": "Players.CustomData.Team", "Reference": "Blue", "Not": false, "EnableRule": true } ] } ], "MatchRules": [] }, "BackfillEnabled": false}
The following code is an example of compatible ticket and player data.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "e16naw0e6cgm8kw3vimtxt9qmhva", "customData": { "Team": "Blue" } } ]}

60 players

A 60-players match, similar to Battle Royal, with no teams.
The number of minimum players to start the game relaxes to 30 after the oldest ticket in the match is 15 seconds old.
Backfill is enabled, allowing players to join after the match is created.
{ "Name": "60 Players", "MatchDefinition": { "Teams": [ { "Name": "Team", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 60, "Max": 60, "Relaxations": [ { "Type": "RangeControl.ReplaceMin", "AgeType": "Oldest", "Value": 30, "AtSeconds": 15 } ] }, "TeamRules": [] } ], "MatchRules": [] }, "BackfillEnabled": true}
The following code is an example of compatible ticket and player data.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "x7e9zb9t1928r0zw8x5j1sxhowkl", "customData": {} } ]}

20 teams of 3 players

The following sample includes 20 teams of exactly 3 players. The number of minimum teams to start the game relaxes when the youngest ticket in the match is 15 seconds old. The number of players in a team is always 3.
{ "Name": "20 teams of 3 players", "MatchDefinition": { "Teams": [ { "Name": "Team", "TeamCount": { "Min": 20, "Max": 20, "Relaxations": [ { "Type": "RangeControl.ReplaceMin", "AgeType": "Youngest", "Value": 10, "AtSeconds": 15 } ] }, "PlayerCount": { "Min": 3, "Max": 3, "Relaxations": [] }, "TeamRules": [] } ], "MatchRules": [] }, "BackfillEnabled": true}
The following code is an example of compatible ticket and player data.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "91isf42z1n95lpv52upxrjc4ttvj", "customData": {} } ]}

Everyone in a team has chosen a different character

{ "Name": "20 teams of 3 players", "MatchDefinition": { "Teams": [ { "Name": "Team", "TeamCount": { "Min": 20, "Max": 20, "Relaxations": [] }, "PlayerCount": { "Min": 3, "Max": 3, "Relaxations": [] }, "TeamRules": [ { "Name": "Different characters", "Type": "Equality", "Source": "Players.CustomData.Character", "Not": true, "EnableRule": true } ] } ], "MatchRules": [] }, "BackfillEnabled": true}
The following code is an example of compatible ticket and player data.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "1v0wykm1d3edny8mcdnx53yr7wrg", "customData": { "Character":"Cloud" } } ]}

Asymmetrical 5v1 - Human vs Monster

Every player in the Human team must have the Human value to
true
.
The player in the Monster team must have the Monster value to
true
.
These rules allow players to choose more than 1 role.
{ "Name": "Asymmetrical 5v1", "MatchDefinition": { "Teams": [ { "Name": "Human", "TeamCount": { "Min": 1, "Max": 1, "Relaxations": [] }, "PlayerCount": { "Min": 5, "Max": 5, "Relaxations": [] }, "TeamRules": [ { "Name": "Human", "Type": "Equality", "Source": "Players.CustomData.Human", "Reference": "true", "Not": false, "EnableRule": true } ] }, { "Name": "Monster", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 1, "Max": 1 }, "TeamRules": [ { "Name": "Monster", "Type": "Equality", "Source": "Players.CustomData.Monster", "Reference": "true", "Not": false, "EnableRule": true } ] } ], "MatchRules": [] }, "BackfillEnabled": false}
The following code is an example of compatible ticket and player data.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "ngbbufcpbph227f42rpdv0v8zs75", "customData": { "Human": "true", "Monster": "false" } } ]}

Require some roles to be filled in the match

These rules require that the Human team contains players with the following roles:
  • 1 Medic
  • 2 Tanks
  • 2 DPS
{ "Name": "Asymmetrical 5v1", "MatchDefinition": { "Teams": [ { "Name": "Human", "TeamCount": { "Min": 1, "Max": 1, "Relaxations": [] }, "PlayerCount": { "Min": 5, "Max": 5, "Relaxations": [] }, "TeamRules": [ { "Name": "Human", "Type": "Equality", "Source": "Players.CustomData.Human", "Reference": "true", "Not": false, "EnableRule": true }, { "Name": "Medic", "Type": "GreaterThanEqual", "Source": "Players.CustomData.Medic.Sum", "Reference": 1, "Not": false, "EnableRule": true }, { "Name": "Tank", "Type": "GreaterThanEqual", "Source": "Players.CustomData.Tank.Sum", "Reference": 2, "Not": false, "EnableRule": true }, { "Name": "DPS", "Type": "GreaterThanEqual", "Source": "Players.CustomData.DPS.Sum", "Reference": 2, "Not": false, "EnableRule": true } ] }, { "Name": "Monster", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 1, "Max": 1 }, "TeamRules": [ { "Name": "Monster", "Type": "Equality", "Source": "Players.CustomData.Monster", "Reference": "true", "Not": false, "EnableRule": true } ] } ], "MatchRules": [] }, "BackfillEnabled": false}
The following code is an example of compatible ticket and player data.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "l142lvdrbuyox8lwxs5sfyt8lshv", "customData": { "Human": "true", "Monster": "false", "Medic": 1, // the role the player chose "Tank": 0, "DPS": 0 } } ]}

Lobby-like game server

These rules request a game server as soon as someone creates a ticket if no servers are running. Otherwise, backfill fills up the server that is running.
{ "Name": "City", "MatchDefinition": { "Teams": [ { "Name": "City", "TeamCount": { "Min": 1, "Max": 1, "Relaxations": [] }, "PlayerCount": { "Min": 1, "Max": 100, "Relaxations": [] }, "TeamRules": [] } ], "MatchRules": [] }, "BackfillEnabled": true}
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "cb108q26yxt3lldyjfg54p8uuayk", "customData": {} } ]}

Players can choose the city they are in

Every player in a match must have the same city. If it can't find a match with that city, matchmaker requests a new allocation for that city.
{ "Name": "City", "MatchDefinition": { "Teams": [ { "Name": "City", "TeamCount": { "Min": 1, "Max": 1, "Relaxations": [] }, "PlayerCount": { "Min": 1, "Max": 100, "Relaxations": [] }, "TeamRules": [] } ], "MatchRules": [ { "Name": "City", "Type": "Equality", "Source": "Players.CustomData.City", "Not": false, "EnableRule": true } ] }, "BackfillEnabled": true}
The following code is an example of compatible ticket and player data.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "cb108q26yxt3lldyjfg54p8uuayk", "customData": { "City": "Azarel" } } ]}

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • 1v1

      • QoS is equivalent for all the players in the match

    • 5v5, Team Red vs Team Blue

    • 60 players

    • 20 teams of 3 players

      • Everyone in a team has chosen a different character

    • Asymmetrical 5v1 - Human vs Monster

      • Require some roles to be filled in the match

    • Lobby-like game server

      • Players can choose the city they are in


이 페이지의 문제 보고