Photon Fusion 2.1.1

NetworkBehaviourId Struct Reference

Represents the unique identifier for a NetworkBehaviour instance. More...

Inherits INetworkStruct.

Public Member Functions

readonly bool Equals (NetworkBehaviourId other)
 Checks if this NetworkBehaviourId is equal to another NetworkBehaviourId. Two NetworkBehaviourIds are equal if their Objects and Behaviours are equal.
override readonly bool Equals (object obj)
 Checks if this NetworkBehaviourId is equal to another object. The object is considered equal if it is a NetworkBehaviourId and its Object and Behaviour are equal to this NetworkBehaviourId's.
override readonly int GetHashCode ()
 Returns a hash code for this NetworkBehaviourId. The hash code is computed based on the Object's hash code and the Behaviour.
override readonly string ToString ()
 Returns a string representation of the NetworkBehaviourId. The string representation is in the format: [Object:{Object}, Behaviour:{Behaviour}].

Static Public Member Functions

static bool operator!= (NetworkBehaviourId a, NetworkBehaviourId b)
 Determines whether two NetworkBehaviourId instances are not equal. Two NetworkBehaviourId instances are considered not equal if their Objects or Behaviours are not equal.
static bool operator== (NetworkBehaviourId a, NetworkBehaviourId b)
 Determines whether two NetworkBehaviourId instances are equal. Two NetworkBehaviourId instances are considered equal if their Objects and Behaviours are equal.

Public Attributes

int Behaviour
 The identifier for the behaviour within the object.
NetworkId Object
 The NetworkId of the object this behaviour belongs to.

Properties

readonly bool IsValid [get]
 Checks if the NetworkBehaviourId is valid. A NetworkBehaviourId is valid if its Object is valid and its Behaviour is non-negative.
static NetworkBehaviourId None [get]
 Returns a new NetworkBehaviourId with default values.

Detailed Description

Represents the unique identifier for a NetworkBehaviour instance.

Member Function Documentation

◆ Equals() [1/2]

readonly bool Equals ( NetworkBehaviourId other)

Checks if this NetworkBehaviourId is equal to another NetworkBehaviourId. Two NetworkBehaviourIds are equal if their Objects and Behaviours are equal.

Parameters
otherThe other NetworkBehaviourId to compare with.
Returns
True if the NetworkBehaviourIds are equal, false otherwise.

◆ Equals() [2/2]

override readonly bool Equals ( object obj)

Checks if this NetworkBehaviourId is equal to another object. The object is considered equal if it is a NetworkBehaviourId and its Object and Behaviour are equal to this NetworkBehaviourId's.

Parameters
objThe object to compare with.
Returns
True if the object is a NetworkBehaviourId and is equal to this, false otherwise.

◆ GetHashCode()

override readonly int GetHashCode ( )

Returns a hash code for this NetworkBehaviourId. The hash code is computed based on the Object's hash code and the Behaviour.

Returns
A hash code for this NetworkBehaviourId.

◆ operator!=()

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

Determines whether two NetworkBehaviourId instances are not equal. Two NetworkBehaviourId instances are considered not equal if their Objects or Behaviours are not equal.

Parameters
aThe first NetworkBehaviourId to compare.
bThe second NetworkBehaviourId to compare.
Returns
True if the NetworkBehaviourId instances are not equal, false otherwise.

◆ operator==()

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

Determines whether two NetworkBehaviourId instances are equal. Two NetworkBehaviourId instances are considered equal if their Objects and Behaviours are equal.

Parameters
aThe first NetworkBehaviourId to compare.
bThe second NetworkBehaviourId to compare.
Returns
True if the NetworkBehaviourId instances are equal, false otherwise.

◆ ToString()

override readonly string ToString ( )

Returns a string representation of the NetworkBehaviourId. The string representation is in the format: [Object:{Object}, Behaviour:{Behaviour}].

Returns
A string representation of the NetworkBehaviourId.