# 类 UMatchmakerServerBlueprintUtil

> Review the utility functions available for working with the Matchmaker Server Blueprint API.

##### Include（包括）##include

```cpp
#include <MatchmakerServer/Public/Utils/MatchmakerServerBlueprintUtil.h>
```

##### 语法##syntax

```cpp
UCLASS()
 class UMatchmakerServerBlueprintUtil : public UBlueprintFunctionLibrary
```

继承自 [UBlueprintFunctionLibrary](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Engine/Kismet/UBlueprintFunctionLibrary/)。

## 方法##methods

### CreateBackfillTicketOptionsAddStringAttribute(FCreateBackfillTicketOptions&, FString, FString)##createbackfillticketoptionsaddstringattribute(fcreatebackfillticketoptions&,-fstring,-fstring)

向 `CreateBackfillTicketOptions` 添加字符串属性。

#### 声明##declaration

```cpp
UFUNCTION(BlueprintCallable, Category = "Unity Gaming Services | Matchmaker Util")
static bool CreateBackfillTicketOptionsAddStringAttribute(UPARAM(ref) FCreateBackfillTicketOptions& Options, FString Key, FString Value)
```

#### 参数##parameters

| **Name**  | **类型**                                                                                  | **描述**        |
| :-------- | :-------------------------------------------------------------------------------------- | :------------ |
| `Options` | [FCreateBackfillTicketOptions](../models/create-backfill-ticket-options)`&`             | 要添加属性的回填工单选项。 |
| `Key`     | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 属性的键。         |
| `Value`   | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 为属性添加的字符串值。   |

#### 返回##returns

| **类型** | **描述**                           |
| :----- | :------------------------------- |
| `bool` | 如果添加属性成功，返回 `true`，否则返回 `false`。 |

### CreateBackfillTicketOptionsAddNumberAttribute(FCreateBackfillTicketOptions&, FString, float)##createbackfillticketoptionsaddnumberattribute(fcreatebackfillticketoptions&,-fstring,-float)

向 `CreateBackfillTicketOptions` 添加数字属性。

#### 声明##declaration

```cpp
UFUNCTION(BlueprintCallable, Category = "Unity Gaming Services | Matchmaker Util")
static bool CreateBackfillTicketOptionsAddNumberAttribute(UPARAM(ref) FCreateBackfillTicketOptions& Options, FString Key, float Value)
```

#### 参数##parameters

| **Name**  | **类型**                                                                                  | **描述**        |
| :-------- | :-------------------------------------------------------------------------------------- | :------------ |
| `Options` | [FCreateBackfillTicketOptions](../models/create-backfill-ticket-options)`&`             | 要添加属性的回填工单选项。 |
| `Key`     | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 属性的键。         |
| `Value`   | `float`                                                                                 | 为属性添加的数字值。    |

#### 返回##returns

| **类型** | **描述**                           |
| :----- | :------------------------------- |
| `bool` | 如果添加属性成功，返回 `true`，否则返回 `false`。 |

### CreateBackfillTicketOptionsRemoveAttribute(FCreateBackfillTicketOptions&, FString)##createbackfillticketoptionsremoveattribute(fcreatebackfillticketoptions&,-fstring)

从 `CreateBackfillTicketOptions` 移除一个属性。

#### 声明##declaration

```cpp
UFUNCTION(BlueprintCallable, Category = "Unity Gaming Services | Matchmaker Util")
static bool CreateBackfillTicketOptionsRemoveAttribute(UPARAM(ref) FCreateBackfillTicketOptions& Options, FString Key)
```

#### 参数##parameters

| **Name**  | **类型**                                                                                  | **描述**        |
| :-------- | :-------------------------------------------------------------------------------------- | :------------ |
| `Options` | [FCreateBackfillTicketOptions](../models/create-backfill-ticket-options)`&`             | 要移除属性的回填工单选项。 |
| `Key`     | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 要移除的属性的键。     |

#### 返回##returns

| **类型** | **描述**                                                     |
| :----- | :--------------------------------------------------------- |
| `bool` | 如果 Options 包含该属性并且该属性已被移除，则返回 `true`；如果不包含该属性，则返回 `false`。 |

### DeserializeMatchmakingResults(FString)##deserializematchmakingresults(fstring)

将包含匹配结果 JSON 的 FString 转换为 Blueprint 可访问的结构。仅适用于 Multiplay 有效负载分配。

#### 声明##declaration

```cpp
UFUNCTION(BlueprintCallable, Category = "Unity Gaming Services | Matchmaker Util")
static FMatchmakingResults DeserializeMatchmakingResults(FString JsonValueAsString)
```

#### 参数##parameters

| **Name**            | **类型**                                                                                  | **描述**           |
| :------------------ | :-------------------------------------------------------------------------------------- | :--------------- |
| `JsonValueAsString` | [FString](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Core/Containers/FString/) | 要反序列化的 JSON 字符串。 |

#### 返回##returns

| **类型**                                               | **描述**                     |
| :--------------------------------------------------- | :------------------------- |
| [FMatchmakingResults](../models/matchmaking-results) | 反序列化后的 MatchmakingResults。 |
