Struct PlayerChangeRequest
- Namespace
- Unity.Multiplayer.Core
A player's request to change their name and/or colour, which the server checks with Validate().
public readonly struct PlayerChangeRequest
- Inherited Members
Constructors
PlayerChangeRequest(string, PlayerColor?)
A request; null leaves that part as it is.
public PlayerChangeRequest(string displayName, PlayerColor? color)
Parameters
displayNamestringcolorPlayerColor?
Properties
Color
The new colour, or null to keep the current one.
public PlayerColor? Color { get; }
Property Value
DisplayName
The new name, or null to keep the current one.
public string DisplayName { get; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Validate()
Why the server refuses this request, or null when it is acceptable: it must change something, the name must pass Validate(string) and the colour Validate(PlayerColor).
public string Validate()