文档

​
​

Development

User Acquisition

Monetization

工业

Matchmaker for the Unreal Engine

Matchmaker overview

Matchmaker for the Unreal Engine

Multiplayer services for Unreal
​
​
Matchmaker for the Unreal Engine
  • Overview
  • Get started
  • Integrate using Blueprints
  • Integrate using C++
API reference
  • Overview of C++ APIs
  • Client APIs
    • Blueprint API
    • Client Subsystem
    • Models
    • Client Blueprint Utils
  • Server APIs
  • Matchmaker Core APIs
  • Services Core Utilities
  1. 适用于 Unreal Engine 的 Matchmaker SDK

类 UMatchmakerClientBlueprintUtil

Review the utility functions available for working with the Matchmaker Client Blueprint API.
阅读时间4 分钟
最后更新于 7 个月前

Include(包括)
#include <MatchmakerClient/Public/Utils/MatchmakerClientBlueprintUtil.h>
语法
UCLASS()class UMatchmakerClientBlueprintUtil : public UBlueprintFunctionLibrary
继承自 UBlueprintFunctionLibrary

方法

PlayerCustomDataAddStringData(FMatchmakerPlayer&, FString, FString)

将自定义数据字符串添加到玩家的 CustomData 字段。

声明

UFUNCTION(BlueprintCallable, Category = "Unity Gaming Services | Matchmaker Util")static bool PlayerCustomDataAddStringData(UPARAM(ref) FMatchmakerPlayer& Player, FString Key, FString Value)

参数

Name

类型

描述

Player
FMatchmakerPlayer
&
要将自定义数据添加到的 Matchmaker 玩家。
Key
FString自定义数据的键。
Value
FString为自定义数据添加的字符串值。

返回

类型

描述

bool
如果添加自定义数据成功,返回
true
,否则返回
false
。

PlayerCustomDataAddNumberData(FMatchmakerPlayer&, FString, float)

将自定义数据数字添加到玩家的 CustomData 字段。

声明

UFUNCTION(BlueprintCallable, Category = "Unity Gaming Services | Matchmaker Util")static bool PlayerCustomDataAddNumberData(UPARAM(ref) FMatchmakerPlayer& Player, FString Key, float Value)

参数

Name

类型

描述

Player
FMatchmakerPlayer
&
要将自定义数据添加到的 Matchmaker 玩家。
Key
FString自定义数据的键。
Value
float
为自定义数据添加的数字值。

返回

类型

描述

bool
如果添加自定义数据成功,返回
true
,否则返回
false
。

PlayerCustomDataRemoveData(FMatchmakerPlayer&, FString)

从 MatchmakerPlayer 的 CustomData 中移除自定义数据字段。

声明

UFUNCTION(BlueprintCallable, Category = "Unity Gaming Services | Matchmaker Util")static bool PlayerCustomDataRemoveData(UPARAM(ref) FMatchmakerPlayer& Player, FString Key)

参数

Name

类型

描述

Player
FMatchmakerPlayer
&
要移除自定义数据的 Matchmaker 玩家。
Key
FString要移除的数据的键。

返回

类型

描述

bool
如果 MatchmakerPlayer
CustomData
包含该字段并且该字段已被移除,则返回
true
;如果不包含该字段,则返回
false
。

CreateTicketOptionsAddStringAttribute(FCreateTicketOptions&, FString, FString)

向 CreateTicketOptions 添加字符串属性。

声明

UFUNCTION(BlueprintCallable, Category = "Unity Gaming Services | Matchmaker Util")static bool CreateTicketOptionsAddStringAttribute(UPARAM(ref) FCreateTicketOptions& Options, FString Key, FString Value)

参数

Name

类型

描述

Options
FCreateTicketOptions
&
要添加属性的工单选项。
Key
FString属性的键。
Value
FString为属性添加的字符串值。

返回

类型

描述

bool
如果添加属性成功,返回
true
,否则返回
false
。

CreateTicketOptionsAddNumberAttribute(FCreateTicketOptions&, FString, float)

向
CreateTicketOptions
添加数字属性。

声明

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

参数

Name

类型

描述

Options
FCreateTicketOptions
&
要添加属性的工单选项。
Key
FString属性的键。
Value
float
为属性添加的数字值。

返回

类型

描述

bool
如果添加自定义数据成功,返回
true
,否则返回
false
。

CreateTicketOptionsRemoveAtrribute(FCreateTicketOptions&, FString)

从 CreateTicketOptions 移除属性。

声明

UFUNCTION(BlueprintCallable, Category = "Unity Gaming Services | Matchmaker Util")static bool CreateTicketOptionsRemoveAtrribute(UPARAM(ref) FCreateTicketOptions& Options, FString Key)

参数

Name

类型

描述

Options
FCreateTicketOptions
&
要移除属性的工单选项。
Key
FString要移除的属性的键。

返回

类型

描述

bool
如果 Options 包含该属性并且该属性已被移除,则返回
true
;如果不包含该属性,则返回
false
。

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

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

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

  • 在本页上
    • Include(包括)

    • 语法

    • 方法

      • PlayerCustomDataAddStringData(FMatchmakerPlayer&, FString, FString)

        • 声明

        • 参数

        • 返回

      • PlayerCustomDataAddNumberData(FMatchmakerPlayer&, FString, float)

        • 声明

        • 参数

        • 返回

      • PlayerCustomDataRemoveData(FMatchmakerPlayer&, FString)

        • 声明

        • 参数

        • 返回

      • CreateTicketOptionsAddStringAttribute(FCreateTicketOptions&, FString, FString)

        • 声明

        • 参数

        • 返回

      • CreateTicketOptionsAddNumberAttribute(FCreateTicketOptions&, FString, float)

        • 声明

        • 参数

        • 返回

      • CreateTicketOptionsRemoveAtrribute(FCreateTicketOptions&, FString)

        • 声明

        • 参数

        • 返回


报告此页面的问题