> ## 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-TW/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunityget.md)
- [PlayFabMultiplayerManager.Get().Resume](/zh-TW/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunityresume.md)
- [PlayFabMultiplayerManager.Get().Suspend](/zh-TW/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunitysuspend.md)
- [PlayFabMultiplayerManager.Get().LeaveNetwork](/zh-TW/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunityleavenetwork.md)
- [PlayFabMultiplayerManager.Get().CreateAndJoinNetwork](/zh-TW/services/playfab/multiplayer/networking/unity-party-api-reference/classes/playfabmultiplayermanager/methods/playfabunitycreateandjoinnetwork.md)
