ReplayState Class

Ultimate Replay

ReplayState Class
A ReplayState allows replay objects to serialize and deserialize their data. See IReplaySerialize.
Inheritance Hierarchy
SystemObject  UltimateReplayReplayState

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public sealed class ReplayState

The ReplayState type exposes the following members.

Constructors
  NameDescription
Public methodReplayState
Create an empty ReplayState that can be written to.
Top
Methods
  NameDescription
Public methodClear
Clears all buffered data from this ReplayState and resets its state.
Public methodRead16
Read a short from the state.
Public methodRead32
Read an int from the state.
Public methodReadBool
Read a bool from the state.
Public methodReadByte
Read a byte from the state.
Public methodReadBytes(Int32)
Read a byte array from the state.
Public methodReadBytes(Byte, Int32, Int32)
Fill a byte array with data from the state.
Public methodReadColor
Read a colour from the state.
Public methodReadColor32
Read a colour32 from the state.
Public methodReadFloat
Read a float from the state.
Public methodReadFloatLowPrecision
Attempts to read a low precision float. You should only use this method when the value is relativley small (less than 65000).
Public methodReadIdentity
Read a ReplayIdentity from the state.
Public methodReadQuat
Read a quaternion from the state.
Public methodReadState
Read the specified amount of bytes as a new ReplayState.
Public methodReadString
Read a string from the state
Public methodReadVec2
Read a vector2 from the state.
Public methodReadVec3
Read a vector3 from the state.
Public methodReadVec4
Read a vector4 from the state.
Public methodToArray
Get the ReplayState data as a byte array.
Public methodTryReadObject
Attempts to read an object state from this ReplayState.
Public methodTryWriteObject
Attempts to write an object to this ReplayState. This method may write extra meta data for deserialization purposes which may cause excessive storage size. Use one of the Write(Byte) methods if the type is known at compile time.
Public methodWrite(Boolean)
Write a bool to the state.
Public methodWrite(Byte)
Write a byte to the state.
Public methodWrite(Byte)
Write a byte array to the state.
Public methodWrite(Int16)
Write a short to the state.
Public methodWrite(Int32)
Write an int to the state.
Public methodWrite(Single)
Write a float to the state.
Public methodWrite(String)
Write a string to the state.
Public methodWrite(Color)
Write a colour to the state.
Public methodWrite(Color32)
Write a colour32 value to the state.
Public methodWrite(Quaternion)
Write a quaternion to the state.
Public methodWrite(Vector2)
Write a vector2 to the state.
Public methodWrite(Vector3)
Write a vector3 to the state.
Public methodWrite(Vector4)
Write a vector4 to the state.
Public methodWrite(ReplayIdentity)
Write the specified replay identity to this ReplayState.
Public methodWrite(ReplayState)
Write the entire contents of a ReplayState to this ReplayState. All bytes will be appended.
Public methodWrite(Byte, Int32, Int32)
Write a byte array to the state using an offset position and length.
Public methodWriteLowPrecision
Attempts to write a 32 bit float value as a low precision 16 bit representation. You should only use this method when the value is relativley small (less than 65000). Accuracy may be lost by storing low precision values.
Top
Properties
  NameDescription
Public propertyCanRead
Returns true if the state contains any more data.
Public propertyEndRead
Returns true if the read pointer is at the end of the buffered data or false if there is still data to be read.
Public propertySize
Returns the size of the object state in bytes.
Top
See Also