Photon Fusion
2.1.1
Helpful for reading from a BufferedData<T>. More...
Public Member Functions | |
| BufferedDataReader (BufferedData< T > bufferedData) | |
| Creates new BufferedDataReader<T> that reads from the passed in BufferedData<T>. | |
| bool | Read (out T value) |
| Reads the next value from the underlying circular buffer. | |
Properties | |
| readonly T | Recent [get] |
| Gets the most recent value written to the buffer or default(T) if no data has been written yet. | |
Helpful for reading from a BufferedData<T>.
keeps track of where in the circular buffer we have read to and reading can be resumed using BufferedDataReader<T>.Read(out T)
| T |
| T | : | struct |
| BufferedDataReader | ( | BufferedData< T > | bufferedData | ) |
Creates new BufferedDataReader<T> that reads from the passed in BufferedData<T>.
| bufferedData |
| bool Read | ( | out T | value | ) |
Reads the next value from the underlying circular buffer.
Increments the index and returns true if an item was found.
Can be called from a while loop that exits when this returns false
| value | The read value |