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

# RemoveEntityFromSession SignalR 服务器方法

> 适用于 PlayFab 实时消息的 RemoveEntityFromSession SignalR 服务器方法,可将先前加入共享订阅会话的实体分离。

<Note>
  此处记录的 REST 和 SignalR API 比客户端 SDK 更复杂。除非这些 SDK 不能满足你的需求,否则请考虑使用 [Lobby C++ SDK](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/pflobby_members) 或 [Matchmaking C++ SDK](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmatchmaking/pfmatchmaking_members)。
</Note>

移除通过 [AddEntityToSession](/services/playfab/multiplayer/real-time-messages/server-methods/add-entity-to-session) 添加到会话的额外实体。

```text theme={null}
SharedSessionResponse RemoveEntityFromSession(SharedSessionRequest request)
```

<Tip>
  这是一个 SignalR 服务器方法。请参阅有关在 SignalR 客户端中[调用服务器方法](https://learn.microsoft.com/en-us/aspnet/core/signalr/dotnet-client#call-hub-methods-from-client)的文档。
</Tip>

## 参数

[**`SharedSessionRequest`**](/services/playfab/multiplayer/real-time-messages/types/shared-session-request)

## 返回值

[**`SharedSessionResponse`**](/services/playfab/multiplayer/real-time-messages/types/shared-session-response)

## 另请参阅

* 服务器方法 [AddEntityToSession](/services/playfab/multiplayer/real-time-messages/server-methods/add-entity-to-session)
* [实时消息 SignalR 中心](/services/playfab/multiplayer/real-time-messages/signalr-hub)
* [Lobby 和 Matchmaking API 的实时消息](/services/playfab/multiplayer/real-time-messages/overview)


## Related topics

- [AddEntityToSession SignalR 服务器方法](/zh-CN/services/playfab/multiplayer/real-time-messages/server-methods/add-entity-to-session.md)
- [EndSession SignalR 服务器方法](/zh-CN/services/playfab/multiplayer/real-time-messages/server-methods/end-session.md)
- [StartOrRecoverSession SignalR 服务器方法](/zh-CN/services/playfab/multiplayer/real-time-messages/server-methods/start-or-recover-session.md)
- [SharedSessionRequest 实时消息类型](/zh-CN/services/playfab/multiplayer/real-time-messages/types/shared-session-request.md)
- [SharedSessionResponse 实时消息类型](/zh-CN/services/playfab/multiplayer/real-time-messages/types/shared-session-response.md)
