Photon Fusion 2.1.1

UnityArraySurrogate< T, ReaderWriter > Class Template Referenceabstract

A base class for Unity array surrogates. More...

Inherits UnitySurrogateBase.

Public Member Functions

override void Init (int capacity)
 Initializes the UnityArraySurrogate with a specified capacity.
override void Read (int *data, int capacity)
 Reads data into the UnityArraySurrogate from a specified memory location.
override void Write (int *data, int capacity)
 Writes data from the UnityArraySurrogate to a specified memory location.
Public Member Functions inherited from UnitySurrogateBase
void Init (int capacity)
 Initializes the UnitySurrogateBase with a specified capacity.
void Read (int *data, int capacity)
 Reads data from a specified memory location into the UnitySurrogateBase.
void Write (int *data, int capacity)
 Writes data from the UnitySurrogateBase to a specified memory location.

Properties

T[] DataProperty [get, set]
 Gets or sets the data array for the UnityArraySurrogate.

Detailed Description

A base class for Unity array surrogates.

Template Parameters
TUnmanaged type of the array elements.
ReaderWriterUnmanaged type of the reader/writer for the array elements.
Type Constraints
T :unmanaged 
ReaderWriter :unmanaged 
ReaderWriter :IElementReaderWriter<T> 

Member Function Documentation

◆ Init()

override void Init ( int capacity)

Initializes the UnityArraySurrogate with a specified capacity.

Parameters
capacityThe capacity to initialize the UnityArraySurrogate with.

◆ Read()

override void Read ( int * data,
int capacity )

Reads data into the UnityArraySurrogate from a specified memory location.

Parameters
dataThe memory location to read from.
capacityThe number of elements to read.

Implements IUnitySurrogate.

◆ Write()

override void Write ( int * data,
int capacity )

Writes data from the UnityArraySurrogate to a specified memory location.

Parameters
dataThe memory location to write to.
capacityThe number of elements to write.

Implements IUnitySurrogate.