Photon Fusion 2.0.3

Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
NetworkId Struct Reference

The unique identifier for a network entity. More...

Inherits INetworkStruct, IEquatable< NetworkId >, IComparable, and IComparable< NetworkId >.

Classes

class  EqualityComparer
 IEqualityComparer interface for NetworkId objects. More...
 

Public Member Functions

int CompareTo (NetworkId other)
 Compares the current NetworkId object with another NetworkId object. More...
 
int IComparable. CompareTo (object obj)
 
bool Equals (NetworkId other)
 Determines whether the current NetworkId object is equal to another NetworkId object. More...
 
override bool Equals (object obj)
 Determines whether the specified object is equal to the current NetworkId object. More...
 
override int GetHashCode ()
 Get the hash code for this NetworkId. More...
 
string ToNamePrefixString ()
 String conversion specifically for use in prefixing names of GameObjects. More...
 
override string ToString ()
 String representation of the NetworkId. More...
 
void Write (NetBitBuffer *buffer)
 Writes this NetworkId to the provided NetBitBuffer. More...
 

Static Public Member Functions

static implicit operator bool (NetworkId id)
 Converts the NetworkId object to a boolean value. More...
 
static bool operator!= (NetworkId a, NetworkId b)
 Determines whether two NetworkId objects are not equal. More...
 
static bool operator== (NetworkId a, NetworkId b)
 Determines whether two NetworkId objects are equal. More...
 
static NetworkId Read (NetBitBuffer *buffer)
 Reads a NetworkId from the provided NetBitBuffer. More...
 
static void Write (NetBitBuffer *buffer, NetworkId id)
 Writes the NetworkId to the provided NetBitBuffer. More...
 

Public Attributes

uint Raw
 The raw value of the network id. More...
 

Static Public Attributes

const int ALIGNMENT = 4
 The alignment of the network id in bytes. More...
 
const int BLOCK_SIZE = 8
 The size of the network id block in bytes. More...
 
const uint RAW_PHYSICS_INFO = 4u
 
const uint RAW_PLAYER_REF_DATA_ARRAY = 2u
 
const uint RAW_RUNTIME_CONFIG = 1u
 
const uint RAW_SCENE_INFO = 3u
 
const int SIZE = 4
 The size of the network id in bytes. More...
 

Properties

static EqualityComparer Comparer = new EqualityComparer() [get]
 The IEqualityComparer for NetworkId objects. More...
 
bool IsReserved [get]
 Signal if the network id is reserved. More...
 
bool IsValid [get]
 Signal if the network id is valid. More...
 

Detailed Description

The unique identifier for a network entity.

Member Function Documentation

◆ CompareTo()

int CompareTo ( NetworkId  other)

Compares the current NetworkId object with another NetworkId object.

Parameters
otherA NetworkId object to compare with this object.
Returns
A value that indicates the relative order of the objects being compared.

◆ Equals() [1/2]

bool Equals ( NetworkId  other)

Determines whether the current NetworkId object is equal to another NetworkId object.

Parameters
otherA NetworkId object to compare with this object.
Returns
true if the current object is equal to the other parameter; otherwise, false.

◆ Equals() [2/2]

override bool Equals ( object  obj)

Determines whether the specified object is equal to the current NetworkId object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object; otherwise, false.

◆ GetHashCode()

override int GetHashCode ( )

Get the hash code for this NetworkId.

◆ operator bool()

static implicit operator bool ( NetworkId  id)
static

Converts the NetworkId object to a boolean value.

◆ operator!=()

static bool operator!= ( NetworkId  a,
NetworkId  b 
)
static

Determines whether two NetworkId objects are not equal.

◆ operator==()

static bool operator== ( NetworkId  a,
NetworkId  b 
)
static

Determines whether two NetworkId objects are equal.

◆ Read()

static NetworkId Read ( NetBitBuffer buffer)
static

Reads a NetworkId from the provided NetBitBuffer.

Parameters
bufferThe buffer to read the NetworkId from.
Returns
The NetworkId read from the buffer.

◆ ToNamePrefixString()

string ToNamePrefixString ( )

String conversion specifically for use in prefixing names of GameObjects.

◆ ToString()

override string ToString ( )

String representation of the NetworkId.

◆ Write() [1/2]

void Write ( NetBitBuffer buffer)

Writes this NetworkId to the provided NetBitBuffer.

Parameters
bufferThe buffer to write this NetworkId to.

◆ Write() [2/2]

static void Write ( NetBitBuffer buffer,
NetworkId  id 
)
static

Writes the NetworkId to the provided NetBitBuffer.

Parameters
bufferThe buffer to write the NetworkId to.
idThe NetworkId to write.

Member Data Documentation

◆ ALIGNMENT

const int ALIGNMENT = 4
static

The alignment of the network id in bytes.

◆ BLOCK_SIZE

const int BLOCK_SIZE = 8
static

The size of the network id block in bytes.

◆ Raw

uint Raw

The raw value of the network id.

◆ SIZE

const int SIZE = 4
static

The size of the network id in bytes.

Property Documentation

◆ Comparer

EqualityComparer Comparer = new EqualityComparer()
staticget

The IEqualityComparer for NetworkId objects.

◆ IsReserved

bool IsReserved
get

Signal if the network id is reserved.

◆ IsValid

bool IsValid
get

Signal if the network id is valid.