> ## 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.

# PlayFabMultiplayerManager.Get().ResetParty

> Party Unity SDK 中 PlayFabMultiplayerManager.ResetParty 的参考文档，用于清除 Party 状态，以便可以重新初始化管理器用于新会话。

# ResetParty

如果 PlayFabMultiplayerManager 已连接到某个网络，则该对象将离开该网络。此外，清理并重新初始化与 Party 和相应 PlayFabMultiplayerManager 对象相关的所有资源。如果该对象曾连接到某个网络，则会尝试重新连接到同一网络。

## 语法

```csharp theme={null}
public void PlayFabMultiplayerManager.Get().ResetParty();
```

### 参数

无。

### 返回值

无。

## 备注

在某些连接可能不稳定的网络条件下，调用以下 API 时你可能会收到非致命错误：
SendChatMessage、SendChatMessageToAllPlayers、SendDataMessage、SendDataMessageToAllPlayers。

当游戏收到非致命错误时，不建议调用 ResetParty API，而是应等待来自库的相应异步回调（例如 OnNetworkLeft、OnRemotePlayerLeft）并采取适当的操作。

当游戏无法使用有效的网络描述符加入现有网络，或无法创建新网络时，应使用 ResetParty。
游戏应防止在游戏遇到与 Send\* API 相关错误时，出现多个客户端同时调用 ResetParty 的模式。


## Related topics

- [PlayFabMultiplayerManager.Get](/zh-CN/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunityget.md)
- [PlayFabMultiplayerManager.Get().Resume](/zh-CN/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunityresume.md)
- [PlayFabMultiplayerManager.Get().Suspend](/zh-CN/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunitysuspend.md)
- [PlayFabMultiplayerManager.Get().LeaveNetwork](/zh-CN/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunityleavenetwork.md)
- [PlayFabMultiplayerManager.Get().CreateAndJoinNetwork](/zh-CN/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunitycreateandjoinnetwork.md)
