Photon Fusion 2.0.3

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

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

Inherits INetworkStruct, and IEquatable< NetworkBehaviourId >.

Public Member Functions

bool Equals (NetworkBehaviourId other)
 Checks if this NetworkBehaviourId is equal to another NetworkBehaviourId. Two NetworkBehaviourIds are equal if their Objects and Behaviours are equal. More...
 
override 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. More...
 
override int GetHashCode ()
 Returns a hash code for this NetworkBehaviourId. The hash code is computed based on the Object's hash code and the Behaviour. More...
 
override string ToString ()
 Returns a string representation of the NetworkBehaviourId. The string representation is in the format: [Object:{Object}, Behaviour:{Behaviour}]. More...
 

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

Public Attributes

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

Static Public Attributes

const int SIZE = NetworkId.SIZE + sizeof(int)
 Size of the NetworkBehaviourId structure in bytes. More...
 

Properties

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

Detailed Description

Represents the unique identifier for a NetworkBehaviour instance.

Member Function Documentation

◆ Equals() [1/2]

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 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 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!=()

static 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==()

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

Member Data Documentation

◆ Behaviour

int Behaviour

The identifier for the behaviour within the object.

◆ Object

NetworkId Object

The NetworkId of the object this behaviour belongs to.

◆ SIZE

const int SIZE = NetworkId.SIZE + sizeof(int)
static

Size of the NetworkBehaviourId structure in bytes.

Property Documentation

◆ IsValid

bool IsValid
get

Checks if the NetworkBehaviourId is valid. A NetworkBehaviourId is valid if its Object is valid and its Behaviour is non-negative.

◆ None

NetworkBehaviourId None
staticget

Returns a new NetworkBehaviourId with default values.