Photon Fusion 2.0.0

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

Static Public Member Functions

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

Public Attributes

uint Raw
 The raw value of the network id.
 

Static Public Attributes

const int ALIGNMENT = 4
 The alignment of the network id in bytes.
 
const int BLOCK_SIZE = 8
 The size of the network id block in bytes.
 
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.
 

Properties

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

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.

◆ 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.

◆ 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.