Photon Fusion 2.0.0

Public Member Functions | Public Attributes | List of all members
NetworkBehaviour.PropertyReader< T > Struct Template Reference

Provides a reader for properties of type T in a network behaviour. More...

Public Member Functions

 PropertyReader (int offset)
 Constructs a new PropertyReader with the provided offset.
 
T Read (NetworkBehaviourBuffer first)
 Reads a property of type T from the provided network behaviour buffer.
 
T Read (NetworkBehaviourBuffer first, NetworkBehaviourBuffer second)
 

Public Attributes

 T
 Reads a property of type T from the provided network behaviour buffers.
 

Detailed Description

Provides a reader for properties of type T in a network behaviour.

Template Parameters
TThe type of the property in the network behaviour. Must be unmanaged.
Type Constraints
T :unmanaged 

Constructor & Destructor Documentation

◆ PropertyReader()

PropertyReader ( int  offset)

Constructs a new PropertyReader with the provided offset.

Parameters
offsetThe offset of the property in the network behaviour buffer.

Member Function Documentation

◆ Read()

T Read ( NetworkBehaviourBuffer  first)

Reads a property of type T from the provided network behaviour buffer.

Parameters
firstThe network behaviour buffer to read the property from.
Returns
The property of type T read from the buffer.

Member Data Documentation

◆ T

T

Reads a property of type T from the provided network behaviour buffers.

Parameters
firstThe first network behaviour buffer to read the property from.
secondThe second network behaviour buffer to read the property from.
Returns
A tuple containing the property of type T read from the first and second buffers.