Class DisconnectText
- Namespace
- Unity.Multiplayer.Core
The one place a Disconnection becomes words a player understands, for every DisconnectReason and every ApprovalRejection. Engine-free, so any front end (the package's own, or a game's) shows the same text.
public static class DisconnectText
- Inheritance
-
DisconnectText
- Inherited Members
Methods
For(Disconnection)
The title, sentence and server detail for disconnection.
public static DisconnectMessage For(Disconnection disconnection)
Parameters
disconnectionDisconnection
Returns
Rejected(ApprovalRejection, string)
The title and sentence for a refused connection, with the server's sentence as the detail.
public static DisconnectMessage Rejected(ApprovalRejection rejection, string serverMessage)
Parameters
rejectionApprovalRejectionserverMessagestring
Returns
ShouldShow(Disconnection)
True when the player should be told why the session ended: not for their own leave, not when nothing ended, and not for ClientLeft (a server-side record of someone else leaving).
public static bool ShouldShow(Disconnection disconnection)
Parameters
disconnectionDisconnection