Photon Fusion 2.0.4

Public Member Functions | Properties | List of all members
UnityArraySurrogate< T, ReaderWriter > Class Template Reference

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. More...
 
override void Read (int *data, int capacity)
 Reads data into the UnityArraySurrogate from a specified memory location. More...
 
override void Write (int *data, int capacity)
 Writes data from the UnityArraySurrogate to a specified memory location. More...
 

Properties

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

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)
virtual

Initializes the UnityArraySurrogate with a specified capacity.

Parameters
capacityThe capacity to initialize the UnityArraySurrogate with.

Implements UnitySurrogateBase.

◆ Read()

override void Read ( int *  data,
int  capacity 
)
virtual

Reads data into the UnityArraySurrogate from a specified memory location.

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

Implements UnitySurrogateBase.

◆ Write()

override void Write ( int *  data,
int  capacity 
)
virtual

Writes data from the UnityArraySurrogate to a specified memory location.

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

Implements UnitySurrogateBase.

Property Documentation

◆ DataProperty

abstract T [] DataProperty
getset

Gets or sets the data array for the UnityArraySurrogate.