Skip to main content
Version: 0.1.0

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​

PlayerId

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​

PlayerId

Methods​

Deserialize(NetDataReader)​

public void Deserialize(NetDataReader reader)

Parameters​

reader NetDataReader

Equals(PlayerId)​

public bool Equals(PlayerId other)

Parameters​

other PlayerId

Returns​

bool

Equals(object?)​

public override bool Equals(object? obj)

Parameters​

obj object?

Returns​

bool

GetHashCode()​

public override int GetHashCode()

Returns​

int

Serialize(NetDataWriter)​

public void Serialize(NetDataWriter writer)

Parameters​

writer NetDataWriter

ToString()​

public override string ToString()

Returns​

string

Operators​

operator ==(PlayerId, PlayerId)​

public static bool operator ==(PlayerId left, PlayerId right)

Parameters​

left PlayerId

right PlayerId

Returns​

bool

operator !=(PlayerId, PlayerId)​

public static bool operator !=(PlayerId left, PlayerId right)

Parameters​

left PlayerId

right PlayerId

Returns​

bool

  • Properties
    • Invalid
    • Server
  • Methods
    • Deserialize(NetDataReader)
    • Equals(PlayerId)
    • Equals(object?)
    • GetHashCode()
    • Serialize(NetDataWriter)
    • ToString()
  • Operators
    • operator ==(PlayerId, PlayerId)
    • operator !=(PlayerId, PlayerId)