Struct PlayerId
Namespace: ReadyM.Api.Idents
Assembly: ReadyM.Api.dll
A unique identifier for a player in the current session. This is not a persistent identifier and can change over time, especially if players disconnect and reconnect. It should be used for identifying players during the current session, but not for long-term storage or cross-session identification.
public struct PlayerId : INetSerializable, IEquatable<PlayerId>
Implements
INetSerializable, IEquatable<PlayerId>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties
Invalid
An invalid PlayerId, which can be used to represent the absence of a player or an uninitialized state.
public static PlayerId Invalid { get; }
Property Value
Server
The PlayerId representing the server itself. This can be used to identify actions or messages that originate from the server rather than any specific player.
public static PlayerId Server { get; }
Property Value
Methods
Deserialize(NetDataReader)
public void Deserialize(NetDataReader reader)
Parameters
reader NetDataReader
Equals(PlayerId)
public bool Equals(PlayerId other)
Parameters
other PlayerId
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj object?
Returns
GetHashCode()
public override int GetHashCode()
Returns
Serialize(NetDataWriter)
public void Serialize(NetDataWriter writer)
Parameters
writer NetDataWriter
ToString()
public override string ToString()
Returns
Operators
operator ==(PlayerId, PlayerId)
public static bool operator ==(PlayerId left, PlayerId right)
Parameters
left PlayerId
right PlayerId
Returns
operator !=(PlayerId, PlayerId)
public static bool operator !=(PlayerId left, PlayerId right)
Parameters
left PlayerId
right PlayerId