Struct PayloadDecodeResult

Namespace
Unity.Multiplayer.Core

The outcome of TryDecode(byte[]).

public readonly struct PayloadDecodeResult
Inherited Members

Properties

Error

Why decoding failed, or None.

public PayloadDecodeError Error { get; }

Property Value

PayloadDecodeError

FormatVersion

The format version byte, or -1 when the bytes were too short or not a payload.

public int FormatVersion { get; }

Property Value

int

GameVersion

The sender's game version when it could be read (even from an unsupported format); otherwise null.

public string GameVersion { get; }

Property Value

string

Message

What went wrong, in a sentence; empty on success.

public string Message { get; }

Property Value

string

Payload

The decoded payload; null on failure.

public ConnectionPayload Payload { get; }

Property Value

ConnectionPayload

Success

True when the bytes decoded to a valid payload.

public bool Success { get; }

Property Value

bool