Photon Fusion 2.1.1

UnitySurrogateBase Class Referenceabstract

Represents a base class for Unity surrogates. This class is serializable and provides abstract methods for reading, writing, and initializing data. More...

Inherits IUnitySurrogate.

Inherited by UnityArraySurrogate< T, ReaderWriter >, UnityDictionarySurrogate< TKeyType, TKeyReaderWriter, TValueType, TValueReaderWriter >, UnityLinkedListSurrogate< T, ReaderWriter >, and UnityValueSurrogate< T, TReaderWriter >.

Public Member Functions

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.

Detailed Description

Represents a base class for Unity surrogates. This class is serializable and provides abstract methods for reading, writing, and initializing data.

Member Function Documentation

◆ Init()

void Init ( int capacity)
abstract

Initializes the UnitySurrogateBase with a specified capacity.

Parameters
capacityThe capacity to initialize the UnitySurrogateBase with.

◆ Read()

void Read ( int * data,
int capacity )
abstract

Reads data from a specified memory location into the UnitySurrogateBase.

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

Implements IUnitySurrogate.

◆ Write()

void Write ( int * data,
int capacity )
abstract

Writes data from the UnitySurrogateBase to a specified memory location.

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

Implements IUnitySurrogate.