文档

​
​

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

Rule relaxations

Relax matching rules over time to speed up match creation when player populations are low.
阅读时间2 分钟
最后更新于 16 天前

A relaxation is an alteration of rule behavior. This can be useful for dynamic rule description. Any rule can be relaxed by providing a list of relaxations in the rule.
Relaxation is an important part of rule definition as it can potentially help create matches faster by making some matchmaking rules more lenient overtime, especially when the player population is lower.

Base relaxation contract

Here’s an example of a base relaxation contract:
{ ... Relaxations: [ { "Type": "RelaxationType", "Value": 70, "AtSeconds": 5, "AgeType": "Oldest/Average/Youngest" } ]}

Field

Required

Type

Description

TypeYesstringThe type of relaxation to apply. Refer to Relaxation types below.
ValueYes*The value used by the relaxation rule. Any type is valid. For example, string, bool, list and number.
AtSecondsYesnumberThe number of seconds (inclusive) after which the relaxation is triggered.
AgeTypeYesstringUses the Oldest (default), Average or Youngest ticket times in the match.
Relaxation is triggered based on the age of tickets in a match. Depending how the relaxation is defined, a relaxation will be enabled when:
  • Oldest: The oldest ticket in the match reaches is X seconds old.
  • Youngest: The youngest ticket in the match reaches is X seconds old.
  • Average: The average age of tickets in a match reaches is X seconds old.
注意
Team count and player count are automatically relaxed to their maximum relaxation when backfilling a match.

Relaxation type

Enable

Once the relaxation is triggered, the associated rule is applied. Here’s an example:
{ "Type": "RuleControl.Enable", "AtSeconds": 5, "AgeType": "Youngest" }

Disable

Once the relaxation is triggered, the associated rule stops being applied. Here’s an example:
{ "Type": "RuleControl.Disable", "AtSeconds": 5, "AgeType": "Youngest" }

Replace

Once the relaxation is triggered, the reference value is replaced with another type. Here’s an example:
{ "Type": "ReferenceControl.Replace", "Value": 300, "AtSeconds": 10 }

ReplaceMin

This only applies to the TeamCount or PlayerCount. Once the relaxation is triggered, the minimum value is replaced with the specified value. Here’s an example:
{ "Type": "RangeControl.ReplaceMin", "Value": 70, "AtSeconds": 5, "AgeType": "Youngest" }

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Base relaxation contract

    • Relaxation type

      • Enable

      • Disable

      • Replace

      • ReplaceMin


报告此页面的问题