UltimateReplay Namespace

Ultimate Replay Scripting Reference
UltimateReplay Namespace
Classes
 | Class | Description
Public class | ReplayAudio | A replay component that is responsible for recording and replaying audio effects that are played during gameplay. Audio can only be replayed when playback is not being reversed.
Public class | ReplayBehaviour | This interface can be implemented by mono behaviour scripts in order to receive replay start and end events. It works in a similar way to the 'Start' or 'Update' method however you must explicitly implement the interface as opposed to using magic methods. This allows for slightly improved performance.
Public class | ReplayControls | Default replay controls used for demonstration and testing. Uses legacy GUI for ui rendering.
Public class | ReplayIgnoreAttribute | Attach this attribute to a class that derives from ReplayBehaviour and the replay system will ignore it. This is useful when you want to receive replay events but dont need to record any data.
Public class | ReplayManager | The main interface for Ultimate Replay and allows full control over object recording and playback.
Public class | ReplayObject | Only one instance of ReplayObject can be added to any game object.
Public class | ReplayState | A ReplayState allows replay objects to serialize and deserialize their data. See IReplaySerialize.
Public class | ReplayTime | This class emulates the behaviour of the Time class in Unity and can be used to modify the playback speed of a replay. There are also delta values that can be used to interpolate between frames where a low record frame rate is used. See ReplayTransform for an example.
Public class | ReplayTransform | Attach this component to a game objects in order to record the objects transform for replays. Only one instance of ReplayTransform can be added to any game object.
Public class | ReplayVarAttribute | Use this attribute on a field to mark it for recording. The type the field is defined in must inheit from ReplayBehaviour in order for the field to be recorded automatically. Interpolation between field values is also possible where low record rates are used.
Enumerations
 | Enumeration | Description
Public enumeration | PlaybackDirection | The playback direction used during replay plaback.
Public enumeration | PlaybackOrigin | Represents a playback node that can be used to calcualte playback offsets.
Public enumeration | PlaybackState | The state of the active ReplayManager.


PlaybackDirection Enumeration

PlaybackDirection Enumeration
The playback direction used during replay plaback.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum PlaybackDirection
Members
Member name | Value | Description
Forward | 0 | The replay should be played back in normal mode.
Backward | 1 | The replay should be played back in reverse mode.
See Also

Reference


PlaybackOrigin Enumeration

PlaybackOrigin Enumeration
Represents a playback node that can be used to calcualte playback offsets.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum PlaybackOrigin
Members
Member name | Value | Description
Start | 0 | The start of the playback sequence.
Current | 1 | The current frame in the playback sequence.
End | 2 | The end of the playback sequence.
See Also

Reference


PlaybackState Enumeration

PlaybackState Enumeration
The state of the active ReplayManager.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum PlaybackState
Members
Member name | Value | Description
Idle | 0 | The manager is doing nothing.
Recording | 1 | The manager is currently recording the scene using the current record settings.
Recording_Paused | 2 | The manager is currently paused but is expecting to resume recording.
Playback | 3 | The manager is performing playback using the current settings.
Playback_Paused | 4 | The manager is currently paused but is expecting to resume playback.
See Also

Reference


ReplayAudio Class

ReplayAudio Class
A replay component that is responsible for recording and replaying audio effects that are played during gameplay. Audio can only be replayed when playback is not being reversed.
Inheritance Hierarchy
SystemObject
Object
Component
Behaviour
MonoBehaviour
UltimateReplayReplayBehaviour
UltimateReplayReplayAudio

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class ReplayAudio : ReplayBehaviour

The ReplayAudio type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayAudio | Initializes a new instance of the ReplayAudio class
Top
Methods
 | Name | Description
Public method | Awake | Called by Unity. (Overrides ReplayBehaviourAwake.)
Public method | OnReplayEvent | Called by the replay system when a replay event has occured. (Overrides ReplayBehaviourOnReplayEvent(ReplayEvent).)
Public method | Play | You should call this method as a replacement for AudioSource.Play as it will also record the time of the audio event so that it can be replayed later.
Top
Fields
 | Name | Description
Public field | observedAudioSource | The audio source that will be recorded by this ReplayAudio.
Top
See Also

Reference


ReplayAudio Constructor

ReplayAudio Constructor
Initializes a new instance of the ReplayAudio class

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayAudio()
See Also

Reference

ReplayAudio Class


ReplayAudio Fields

ReplayAudio Fields

The ReplayAudio type exposes the following members.

Fields
 | Name | Description
Public field | observedAudioSource | The audio source that will be recorded by this ReplayAudio.
Top
See Also

Reference

ReplayAudio Class


ReplayAudio.observedAudioSource Field

ReplayAudioobservedAudioSource Field
The audio source that will be recorded by this ReplayAudio.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public AudioSource observedAudioSource

Field Value

Type: AudioSource
See Also

Reference

ReplayAudio Class


ReplayAudio Methods

ReplayAudio Methods

The ReplayAudio type exposes the following members.

Methods
 | Name | Description
Public method | Awake | Called by Unity. (Overrides ReplayBehaviourAwake.)
Public method | OnReplayEvent | Called by the replay system when a replay event has occured. (Overrides ReplayBehaviourOnReplayEvent(ReplayEvent).)
Public method | Play | You should call this method as a replacement for AudioSource.Play as it will also record the time of the audio event so that it can be replayed later.
Top
See Also

Reference

ReplayAudio Class


ReplayAudio.Awake Method

ReplayAudioAwake Method
Called by Unity.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void Awake()
See Also

Reference

ReplayAudio Class


ReplayAudio.OnReplayEvent Method

ReplayAudioOnReplayEvent Method
Called by the replay system when a replay event has occured.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void OnReplayEvent(
    ReplayEvent replayEvent
)

Parameters

replayEvent
Type: UltimateReplay.CoreReplayEvent
The ReplayEvent that was triggered
See Also

Reference

ReplayAudio Class


ReplayAudio.Play Method

ReplayAudioPlay Method
You should call this method as a replacement for AudioSource.Play as it will also record the time of the audio event so that it can be replayed later.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Play()
See Also

Reference

ReplayAudio Class


ReplayBehaviour Class

ReplayBehaviour Class
This interface can be implemented by mono behaviour scripts in order to receive replay start and end events. It works in a similar way to the 'Start' or 'Update' method however you must explicitly implement the interface as opposed to using magic methods. This allows for slightly improved performance.
Inheritance Hierarchy
SystemObject
Object
Component
Behaviour
MonoBehaviour
UltimateReplayReplayBehaviour
UltimateReplayReplayAudio
UltimateReplayReplayTransform
UltimateReplay.StorageReplayTarget

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public abstract class ReplayBehaviour : MonoBehaviour,
    IReplaySerialize

The ReplayBehaviour type exposes the following members.

Constructors
 | Name | Description
Protected method | ReplayBehaviour | Initializes a new instance of the ReplayBehaviour class
Top
Methods
 | Name | Description
Public method | Awake | Called by Unity. Allows the ReplayBehaviour to validate its identity and register its self with the replay system.
Public method | OnReplayDeserialize | Called by the replay system when all replay state information should be deserialized.
Public method | OnReplayEnd | Called by the replay system when playback has ended. You can re-enable game behaviour in this method to allow the gameplay to 'take over'
Public method | OnReplayEvent | Called by the replay system when an event has been received during playback.
Public method | OnReplayPlayPause | Called by the replay system when playback is about to be paused or resumed.
Public method | OnReplaySerialize | Called by the replay system when all replay state information should be serialized.
Public method | OnReplayStart | Called by the replay system when playback is about to start. You can disable game behaviour that should not run during playback in this method, such as player movement.
Public method | OnReplayUpdate | Called by the replay system every frame while playback is active.
Protected method | ReplayDeserializeEvents | Deserializes all active ReplayEvent from the state and dispatches any events to the OnReplayEvent(ReplayEvent) handler.
Protected method | ReplayDeserializeVariables | Deserializes all active ReplayVariable from the state.
Protected method | ReplayFindVariables | Attempts to find any variables marked with the ReplayVarAttribute so that they can be serialized later.
Protected method | ReplayInterpolateVariables | Allows all active ReplayVariable to be interpolated betwen replay frames.
Public method | ReplayRecordEvent(Byte, ReplayState) | Push an event to the replay system for recording.
Public method | ReplayRecordEvent(ReplayEvents, ReplayState) | Push an event to the replay system for recording.
Protected method | ReplaySerializeEvents | Serializes all awaiting ReplayEvent to the state.
Protected method | ReplaySerializeVariables | Serializes all active ReplayVariable to the state.
Public method | Reset | Called by Unity while in editor mode. Allows the unique id to be generated when the script is attached to an object.
Top
Properties
 | Name | Description
Public property | Identity | Get the ReplayIdentity associated with this ReplayBehaviour.
Public property | IsRecording | Returns true if the active replay manager is currently recording the scene. Note: If recording is paused this value will still be true.
Public property | IsReplaying | Returns true if the active replay manager is currently replaying a previous recording. Note: If playback is paused this value will still be true.
Public property | PlaybackDirection | Gets the current PlaybackDirection of replay playback.
Top
See Also

Reference


ReplayBehaviour Constructor

ReplayBehaviour Constructor
Initializes a new instance of the ReplayBehaviour class

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected ReplayBehaviour()
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour Methods

ReplayBehaviour Methods

The ReplayBehaviour type exposes the following members.

Methods
 | Name | Description
Public method | Awake | Called by Unity. Allows the ReplayBehaviour to validate its identity and register its self with the replay system.
Public method | OnReplayDeserialize | Called by the replay system when all replay state information should be deserialized.
Public method | OnReplayEnd | Called by the replay system when playback has ended. You can re-enable game behaviour in this method to allow the gameplay to 'take over'
Public method | OnReplayEvent | Called by the replay system when an event has been received during playback.
Public method | OnReplayPlayPause | Called by the replay system when playback is about to be paused or resumed.
Public method | OnReplaySerialize | Called by the replay system when all replay state information should be serialized.
Public method | OnReplayStart | Called by the replay system when playback is about to start. You can disable game behaviour that should not run during playback in this method, such as player movement.
Public method | OnReplayUpdate | Called by the replay system every frame while playback is active.
Protected method | ReplayDeserializeEvents | Deserializes all active ReplayEvent from the state and dispatches any events to the OnReplayEvent(ReplayEvent) handler.
Protected method | ReplayDeserializeVariables | Deserializes all active ReplayVariable from the state.
Protected method | ReplayFindVariables | Attempts to find any variables marked with the ReplayVarAttribute so that they can be serialized later.
Protected method | ReplayInterpolateVariables | Allows all active ReplayVariable to be interpolated betwen replay frames.
Public method | ReplayRecordEvent(Byte, ReplayState) | Push an event to the replay system for recording.
Public method | ReplayRecordEvent(ReplayEvents, ReplayState) | Push an event to the replay system for recording.
Protected method | ReplaySerializeEvents | Serializes all awaiting ReplayEvent to the state.
Protected method | ReplaySerializeVariables | Serializes all active ReplayVariable to the state.
Public method | Reset | Called by Unity while in editor mode. Allows the unique id to be generated when the script is attached to an object.
Top
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.Awake Method

ReplayBehaviourAwake Method
Called by Unity. Allows the ReplayBehaviour to validate its identity and register its self with the replay system.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void Awake()
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.OnReplayDeserialize Method

ReplayBehaviourOnReplayDeserialize Method
Called by the replay system when all replay state information should be deserialized.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void OnReplayDeserialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to read the data from

Implements

IReplaySerializeOnReplayDeserialize(ReplayState)
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.OnReplayEnd Method

ReplayBehaviourOnReplayEnd Method
Called by the replay system when playback has ended. You can re-enable game behaviour in this method to allow the gameplay to 'take over'

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void OnReplayEnd()
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.OnReplayEvent Method

ReplayBehaviourOnReplayEvent Method
Called by the replay system when an event has been received during playback.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void OnReplayEvent(
    ReplayEvent replayEvent
)

Parameters

replayEvent
Type: UltimateReplay.CoreReplayEvent
The event that was received
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.OnReplayPlayPause Method

ReplayBehaviourOnReplayPlayPause Method
Called by the replay system when playback is about to be paused or resumed.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void OnReplayPlayPause(
    bool paused
)

Parameters

paused
Type: SystemBoolean
True if playback is about to be paused or false if plyabck is about to be resumed
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.OnReplaySerialize Method

ReplayBehaviourOnReplaySerialize Method
Called by the replay system when all replay state information should be serialized.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void OnReplaySerialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to write the data to

Implements

IReplaySerializeOnReplaySerialize(ReplayState)
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.OnReplayStart Method

ReplayBehaviourOnReplayStart Method
Called by the replay system when playback is about to start. You can disable game behaviour that should not run during playback in this method, such as player movement.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void OnReplayStart()
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.OnReplayUpdate Method

ReplayBehaviourOnReplayUpdate Method
Called by the replay system every frame while playback is active.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void OnReplayUpdate()
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.ReplayDeserializeEvents Method

ReplayBehaviourReplayDeserializeEvents Method
Deserializes all active ReplayEvent from the state and dispatches any events to the OnReplayEvent(ReplayEvent) handler.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected virtual void ReplayDeserializeEvents(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to read the variable data from
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.ReplayDeserializeVariables Method

ReplayBehaviourReplayDeserializeVariables Method
Deserializes all active ReplayVariable from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected virtual void ReplayDeserializeVariables(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to read the variable data from
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.ReplayFindVariables Method

ReplayBehaviourReplayFindVariables Method
Attempts to find any variables marked with the ReplayVarAttribute so that they can be serialized later.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected virtual void ReplayFindVariables()
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.ReplayInterpolateVariables Method

ReplayBehaviourReplayInterpolateVariables Method
Allows all active ReplayVariable to be interpolated betwen replay frames.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected virtual void ReplayInterpolateVariables(
    float delta
)

Parameters

delta
Type: SystemSingle
The 't' value between frames used for interpolation
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.ReplayRecordEvent Method

ReplayBehaviourReplayRecordEvent Method
Overload List
 | Name | Description
Public method | ReplayRecordEvent(Byte, ReplayState) | Push an event to the replay system for recording.
Public method | ReplayRecordEvent(ReplayEvents, ReplayState) | Push an event to the replay system for recording.
Top
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.ReplayRecordEvent Method (Byte, ReplayState)

ReplayBehaviourReplayRecordEvent Method (Byte, ReplayState)
Push an event to the replay system for recording.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ReplayRecordEvent(
    byte eventID,
    ReplayState state = null
)

Parameters

eventID
Type: SystemByte
The event id to uniquley identify the event type
state (Optional)
Type: UltimateReplayReplayState
The state data for the event or null if no state data is required
See Also

Reference

ReplayBehaviour Class
ReplayRecordEvent Overload


ReplayBehaviour.ReplayRecordEvent Method (ReplayEvents, ReplayState)

ReplayBehaviourReplayRecordEvent Method (ReplayEvents, ReplayState)
Push an event to the replay system for recording.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ReplayRecordEvent(
    ReplayEvents eventID,
    ReplayState state = null
)

Parameters

eventID
Type: UltimateReplay.CoreReplayEvents
The event id to uniquley identify the event type
state (Optional)
Type: UltimateReplayReplayState
The state data for the event or null if no state data is required
See Also

Reference

ReplayBehaviour Class
ReplayRecordEvent Overload


ReplayBehaviour.ReplaySerializeEvents Method

ReplayBehaviourReplaySerializeEvents Method
Serializes all awaiting ReplayEvent to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected virtual void ReplaySerializeEvents(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to write the varaible data to
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.ReplaySerializeVariables Method

ReplayBehaviourReplaySerializeVariables Method
Serializes all active ReplayVariable to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected virtual void ReplaySerializeVariables(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to write the varaible data to
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.Reset Method

ReplayBehaviourReset Method
Called by Unity while in editor mode. Allows the unique id to be generated when the script is attached to an object.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void Reset()
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour Properties

ReplayBehaviour Properties

The ReplayBehaviour type exposes the following members.

Properties
 | Name | Description
Public property | Identity | Get the ReplayIdentity associated with this ReplayBehaviour.
Public property | IsRecording | Returns true if the active replay manager is currently recording the scene. Note: If recording is paused this value will still be true.
Public property | IsReplaying | Returns true if the active replay manager is currently replaying a previous recording. Note: If playback is paused this value will still be true.
Public property | PlaybackDirection | Gets the current PlaybackDirection of replay playback.
Top
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.Identity Property

ReplayBehaviourIdentity Property
Get the ReplayIdentity associated with this ReplayBehaviour.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayIdentity Identity { get; }

Property Value

Type: ReplayIdentity
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.IsRecording Property

ReplayBehaviourIsRecording Property
Returns true if the active replay manager is currently recording the scene. Note: If recording is paused this value will still be true.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsRecording { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.IsReplaying Property

ReplayBehaviourIsReplaying Property
Returns true if the active replay manager is currently replaying a previous recording. Note: If playback is paused this value will still be true.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsReplaying { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayBehaviour Class


ReplayBehaviour.PlaybackDirection Property

ReplayBehaviourPlaybackDirection Property
Gets the current PlaybackDirection of replay playback.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public PlaybackDirection PlaybackDirection { get; }

Property Value

Type: PlaybackDirection
See Also

Reference

ReplayBehaviour Class


ReplayControls Class

ReplayControls Class
Default replay controls used for demonstration and testing. Uses legacy GUI for ui rendering.
Inheritance Hierarchy
SystemObject
Object
Component
Behaviour
MonoBehaviour
UltimateReplayReplayControls

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class ReplayControls : MonoBehaviour

The ReplayControls type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayControls | Initializes a new instance of the ReplayControls class
Top
Methods
 | Name | Description
Public method | Awake | Called by Unity.
Public method | OnGUI | Called by unity.
Public method | Start | Called by Unity.
Public method | Update | Called by Unity.
Top
Fields
 | Name | Description
Public field | allowPlaybackFreeCam | Should the free cam mode be enabled during playback.
Public field | flySpeed | How fast the free cam can move around the scene.
Public field | lookSpeed | How fast the free cam can look around the scene.
Top
See Also

Reference


ReplayControls Constructor

ReplayControls Constructor
Initializes a new instance of the ReplayControls class

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayControls()
See Also

Reference

ReplayControls Class


ReplayControls Fields

ReplayControls Fields

The ReplayControls type exposes the following members.

Fields
 | Name | Description
Public field | allowPlaybackFreeCam | Should the free cam mode be enabled during playback.
Public field | flySpeed | How fast the free cam can move around the scene.
Public field | lookSpeed | How fast the free cam can look around the scene.
Top
See Also

Reference

ReplayControls Class


ReplayControls.allowPlaybackFreeCam Field

ReplayControlsallowPlaybackFreeCam Field
Should the free cam mode be enabled during playback.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool allowPlaybackFreeCam

Field Value

Type: Boolean
See Also

Reference

ReplayControls Class


ReplayControls.flySpeed Field

ReplayControlsflySpeed Field
How fast the free cam can move around the scene.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float flySpeed

Field Value

Type: Single
See Also

Reference

ReplayControls Class


ReplayControls.lookSpeed Field

ReplayControlslookSpeed Field
How fast the free cam can look around the scene.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float lookSpeed

Field Value

Type: Single
See Also

Reference

ReplayControls Class


ReplayControls Methods

ReplayControls Methods

The ReplayControls type exposes the following members.

Methods
 | Name | Description
Public method | Awake | Called by Unity.
Public method | OnGUI | Called by unity.
Public method | Start | Called by Unity.
Public method | Update | Called by Unity.
Top
See Also

Reference

ReplayControls Class


ReplayControls.Awake Method

ReplayControlsAwake Method
Called by Unity.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Awake()
See Also

Reference

ReplayControls Class


ReplayControls.OnGUI Method

ReplayControlsOnGUI Method
Called by unity.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnGUI()
See Also

Reference

ReplayControls Class


ReplayControls.Start Method

ReplayControlsStart Method
Called by Unity.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Start()
See Also

Reference

ReplayControls Class


ReplayControls.Update Method

ReplayControlsUpdate Method
Called by Unity.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Update()
See Also

Reference

ReplayControls Class


ReplayIgnoreAttribute Class

ReplayIgnoreAttribute Class
Attach this attribute to a class that derives from ReplayBehaviour and the replay system will ignore it. This is useful when you want to receive replay events but dont need to record any data.
Inheritance Hierarchy
SystemObject
SystemAttribute
UltimateReplayReplayIgnoreAttribute

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

The ReplayIgnoreAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayIgnoreAttribute | Initializes a new instance of the ReplayIgnoreAttribute class
Top
See Also

Reference


ReplayIgnoreAttribute Constructor

ReplayIgnoreAttribute Constructor
Initializes a new instance of the ReplayIgnoreAttribute class

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayIgnoreAttribute()
See Also

Reference

ReplayIgnoreAttribute Class


ReplayManager Class

ReplayManager Class
The main interface for Ultimate Replay and allows full control over object recording and playback.
Inheritance Hierarchy
SystemObject
Object
Component
Behaviour
MonoBehaviour
UltimateReplay.UtilMonoSingleton ReplayManager
UltimateReplayReplayManager

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public sealed class ReplayManager : MonoSingleton<ReplayManager>

The ReplayManager type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayManager | Initializes a new instance of the ReplayManager class
Top
Methods
 | Name | Description
 | BeginPlayback | Use this method to begin the playback of the recorded objects. Use SetPlaybackFrame(Single, PlaybackOrigin) or SetPlaybackFrameNormalized(Single, PlaybackOrigin) before calling this method to specify the exact location at which playback should begin. This method will run the entire playback gathered and then automatically stop playback on completion if endReplayAfterPlayback is true.
 | BeginPlaybackFrame | Use this method to set the current playback at a specific replay frame. This will allow the state of a specific replay frame to be restored but will not continue playback which will provide a freeze frame effect. Use SetPlaybackFrame(Single, PlaybackOrigin) or SetPlaybackFrameNormalized(Single, PlaybackOrigin) before calling this method to specify the exact location at which the playback frame should be sampled. Use StopPlayback to unfreeze the still frame and return to normal game mode. This method will ignore the value of endReplayAfterPlayback as only a single frame is replayed. As a result you will need to call StopPlayback when you want to end the playback frame.
 | BeginRecording | Use this method to begin sampling the recorded objects in the scene. If recordOnStart is true then this method will be called automatically when the manager is initialized. Any state information will be recored via the assigned ReplayTarget (Default ReplayMemoryTarget). When true, any previous recording data will be discarded
 | DiscardRecording | This method will throw away any recorded data and flush the replay target if necessary. This method can be called at any time. If the manager is currently recording then all previous data will be discarded and recording will continue. If the manager is currently replaying then all replay data will be discarded and playback will stop.
 | FindReplayPrefab | Attempts to find the prefab with the matching name. This is used to restore objects that were destroyed during recording.
 | ForceAwake | Override implementation of ForceAwake. Performs exactly the same behaviour. Simply included so that the user does not need to import 'UltimateReplay.Util' to access the method.
Public method | OnDestroy | Called by Unity. Allows the active replay manager to cleanup any active recordings.
Public method | OnLevelWasLoaded | Called by Unity. Allows the active replay manager to cleanup recordings when a scene change is made.
Public method | OnValidate | Called by Unity.
 | PausePlayback | Use this method to pause replay playback while maintinaing the current replay state. See ResumePlayback to continue a playback.
 | PauseRecording | Use this method when you want to pause recording but may continue recording at any point. A good candidate for pausing recording is when the user pauses the game and is shown a pause menu. The manager must already be recording otherwise this method will have no effect.
 | RegisterReplayPrefab | Attempts to register a game object as a prefab so that the replay system is able to spawn or despawn the object as needed. You only need to do this for objects that are likley to be either instantiated or destroyed during recording. The replay system will then be able to accuratley restore the scene state during playback. The specified object must be a prefab otherwise an error will be thrown and the object will not be registered. Prefab instances are not accepted.
 | ReplayDestroy | Attempts to destroy the specified prefab. OnReplayDestroy will be called if a listener has been registered otherwise default destruction will be used.
 | ReplayInstantiate | Attempts to instantiate the specified prefab. OnReplayInstantiate will be called if a listener has been registered otherwise default instantiation will be used.
 | ResumePlayback | Use this method to resume playback after a previous call to PausePlayback was called. If PausePlayback was not called prior to this method then the method will have no effect.
 | ResumeRecording | Use this method to resume recording after a previous call to PauseRecording. The manager must already be recording otherwise this method will have no effect.
 | SetPlaybackFrame | Use this method to specify where in the replay sequence the playback should start. If the offset does not lie within the bounds of the replay then the value will be clamped to represent either the start or end frame.
 | SetPlaybackFrameNormalized | Use this method to specify where in the replay sequence the playback should start. This method accepts normalized offsets values between 0 and 1 and performs validation before using the value.
Public method | Start | Called by Unity. Allows the active replay manager to initialize.
 | StopPlayback | Use this method to stop any active playback. This method will only have an effect if there is an active playback running otherwise it will have no effect.
 | StopRecording | Use this method to stop recording after a previous call to BeginRecording(Boolean). The manager must already be recording otherwise this method will have no effect. This method must be called before attempting to playback otherwise you may get unpredicatable results.
Public method | Update | Called by Unity. Allows the active replay manager to update recoring or playback.
Top
Fields
 | Name | Description
Public field | endReplayAfterPlayback | When true, the replay manager will automatically restore the previous game state after playback has finished. When false, playback will continue to loop forever until a suitable stop or pause command is issued manually.
 | OnReplayDestroy | Called by the replay system whenever it needs to destroy a game object in order to restore a previous scene state. You can add a listener to override the default behaviour which can be useful if you want to handle the destruction manually for purposes such as object pooling.
 | OnReplayInstantiate | Called by the replay system whenever it needs to instantiate a prefab for use during playback. You can add a listener to override the default behaviour which can be useful if you want to handle the instantiation manually for purposes such as object pooling.
Public field | prefabs | A collection of prefabs that may be spawned or destroyed during recording and as a result amy need to be spawned or destroyed in order to accuratley recreate the replay.
Public field | recordFPS | The target record framerate of the sampler. The higher this value the higher the memory consumption and cpu usage will be. You will need to fine tune this value to tradeoff performance or memory usage for replay accuracy.
Public field | recordOnStart | When true, the manager will automatically begin recording the scene one it is initialized.
Top
Properties
Name | Description
CurrentPlaybackTime | Get the current playback time in seconds. This value will never be greater than duration.
CurrentPlaybackTimeNormalized | Get the current playback time as a normalized value between 0-1. 0 represents the starting frame of the recording and 1 represents the very last frame of the recording.
IsPaused | Returns true when the active replay manager is in any paused state. Paused states could include Playback_Paused or Recording_Paused.
IsRecording | Returns true if the manager is currently recording the scene. Note: If recording is paused this value will still be true.
IsReplaying | Returns true if the manager is currently playing back previously recorded replay data. Note: if playback is paused this value will still be true.
PlaybackDirection | Gets the current PlaybackDirection of replay playback.
Preparer | Access the current IReplayPreparer that the active replay manager will use to prepare game objects for replay. By default a DefaultReplayPreparer is used.
Replay | Get the active replay manager in the scene. If no replay manager could be found then one will be created with default settings. This property may be null in a rare case where the active replay manager was destroyed in the same frame as an application quit event was issued. In this situation the replay manager cannot be recreated as it would cause leaked objects.
Scene | Get the ReplayScene associated with the replay system.
Target | The current replay target that is being used to store the replay data. By default, the replay target is ReplayMemoryTarget.
Top
See Also

Reference


ReplayManager Constructor

ReplayManager Constructor
Initializes a new instance of the ReplayManager class

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayManager()
See Also

Reference

ReplayManager Class


ReplayManager Fields

ReplayManager Fields

The ReplayManager type exposes the following members.

Fields
 | Name | Description
Public field | endReplayAfterPlayback | When true, the replay manager will automatically restore the previous game state after playback has finished. When false, playback will continue to loop forever until a suitable stop or pause command is issued manually.
 | OnReplayDestroy | Called by the replay system whenever it needs to destroy a game object in order to restore a previous scene state. You can add a listener to override the default behaviour which can be useful if you want to handle the destruction manually for purposes such as object pooling.
 | OnReplayInstantiate | Called by the replay system whenever it needs to instantiate a prefab for use during playback. You can add a listener to override the default behaviour which can be useful if you want to handle the instantiation manually for purposes such as object pooling.
Public field | prefabs | A collection of prefabs that may be spawned or destroyed during recording and as a result amy need to be spawned or destroyed in order to accuratley recreate the replay.
Public field | recordFPS | The target record framerate of the sampler. The higher this value the higher the memory consumption and cpu usage will be. You will need to fine tune this value to tradeoff performance or memory usage for replay accuracy.
Public field | recordOnStart | When true, the manager will automatically begin recording the scene one it is initialized.
Top
See Also

Reference

ReplayManager Class


ReplayManager.endReplayAfterPlayback Field

ReplayManagerendReplayAfterPlayback Field
When true, the replay manager will automatically restore the previous game state after playback has finished. When false, playback will continue to loop forever until a suitable stop or pause command is issued manually.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool endReplayAfterPlayback

Field Value

Type: Boolean
See Also

Reference

ReplayManager Class


ReplayManager.OnReplayDestroy Field

ReplayManagerOnReplayDestroy Field
Called by the replay system whenever it needs to destroy a game object in order to restore a previous scene state. You can add a listener to override the default behaviour which can be useful if you want to handle the destruction manually for purposes such as object pooling.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Action<GameObject> OnReplayDestroy

Field Value

Type: Action GameObject
See Also

Reference

ReplayManager Class


ReplayManager.OnReplayInstantiate Field

ReplayManagerOnReplayInstantiate Field
Called by the replay system whenever it needs to instantiate a prefab for use during playback. You can add a listener to override the default behaviour which can be useful if you want to handle the instantiation manually for purposes such as object pooling.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Func<GameObject, Vector3, Quaternion, GameObject> OnReplayInstantiate

Field Value

Type: Func GameObject, Vector3, Quaternion, GameObject
See Also

Reference

ReplayManager Class


ReplayManager.prefabs Field

ReplayManagerprefabs Field
A collection of prefabs that may be spawned or destroyed during recording and as a result amy need to be spawned or destroyed in order to accuratley recreate the replay.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public GameObject[] prefabs

Field Value

Type: GameObject
See Also

Reference

ReplayManager Class


ReplayManager.recordFPS Field

ReplayManagerrecordFPS Field
The target record framerate of the sampler. The higher this value the higher the memory consumption and cpu usage will be. You will need to fine tune this value to tradeoff performance or memory usage for replay accuracy.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int recordFPS

Field Value

Type: Int32
See Also

Reference

ReplayManager Class


ReplayManager.recordOnStart Field

ReplayManagerrecordOnStart Field
When true, the manager will automatically begin recording the scene one it is initialized.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool recordOnStart

Field Value

Type: Boolean
See Also

Reference

ReplayManager Class


ReplayManager Methods

ReplayManager Methods

The ReplayManager type exposes the following members.

Methods
 | Name | Description
 | BeginPlayback | Use this method to begin the playback of the recorded objects. Use SetPlaybackFrame(Single, PlaybackOrigin) or SetPlaybackFrameNormalized(Single, PlaybackOrigin) before calling this method to specify the exact location at which playback should begin. This method will run the entire playback gathered and then automatically stop playback on completion if endReplayAfterPlayback is true.
 | BeginPlaybackFrame | Use this method to set the current playback at a specific replay frame. This will allow the state of a specific replay frame to be restored but will not continue playback which will provide a freeze frame effect. Use SetPlaybackFrame(Single, PlaybackOrigin) or SetPlaybackFrameNormalized(Single, PlaybackOrigin) before calling this method to specify the exact location at which the playback frame should be sampled. Use StopPlayback to unfreeze the still frame and return to normal game mode. This method will ignore the value of endReplayAfterPlayback as only a single frame is replayed. As a result you will need to call StopPlayback when you want to end the playback frame.
 | BeginRecording | Use this method to begin sampling the recorded objects in the scene. If recordOnStart is true then this method will be called automatically when the manager is initialized. Any state information will be recored via the assigned ReplayTarget (Default ReplayMemoryTarget). When true, any previous recording data will be discarded
 | DiscardRecording | This method will throw away any recorded data and flush the replay target if necessary. This method can be called at any time. If the manager is currently recording then all previous data will be discarded and recording will continue. If the manager is currently replaying then all replay data will be discarded and playback will stop.
 | FindReplayPrefab | Attempts to find the prefab with the matching name. This is used to restore objects that were destroyed during recording.
 | ForceAwake | Override implementation of ForceAwake. Performs exactly the same behaviour. Simply included so that the user does not need to import 'UltimateReplay.Util' to access the method.
Public method | OnDestroy | Called by Unity. Allows the active replay manager to cleanup any active recordings.
Public method | OnLevelWasLoaded | Called by Unity. Allows the active replay manager to cleanup recordings when a scene change is made.
Public method | OnValidate | Called by Unity.
 | PausePlayback | Use this method to pause replay playback while maintinaing the current replay state. See ResumePlayback to continue a playback.
 | PauseRecording | Use this method when you want to pause recording but may continue recording at any point. A good candidate for pausing recording is when the user pauses the game and is shown a pause menu. The manager must already be recording otherwise this method will have no effect.
 | RegisterReplayPrefab | Attempts to register a game object as a prefab so that the replay system is able to spawn or despawn the object as needed. You only need to do this for objects that are likley to be either instantiated or destroyed during recording. The replay system will then be able to accuratley restore the scene state during playback. The specified object must be a prefab otherwise an error will be thrown and the object will not be registered. Prefab instances are not accepted.
 | ReplayDestroy | Attempts to destroy the specified prefab. OnReplayDestroy will be called if a listener has been registered otherwise default destruction will be used.
 | ReplayInstantiate | Attempts to instantiate the specified prefab. OnReplayInstantiate will be called if a listener has been registered otherwise default instantiation will be used.
 | ResumePlayback | Use this method to resume playback after a previous call to PausePlayback was called. If PausePlayback was not called prior to this method then the method will have no effect.
 | ResumeRecording | Use this method to resume recording after a previous call to PauseRecording. The manager must already be recording otherwise this method will have no effect.
 | SetPlaybackFrame | Use this method to specify where in the replay sequence the playback should start. If the offset does not lie within the bounds of the replay then the value will be clamped to represent either the start or end frame.
 | SetPlaybackFrameNormalized | Use this method to specify where in the replay sequence the playback should start. This method accepts normalized offsets values between 0 and 1 and performs validation before using the value.
Public method | Start | Called by Unity. Allows the active replay manager to initialize.
 | StopPlayback | Use this method to stop any active playback. This method will only have an effect if there is an active playback running otherwise it will have no effect.
 | StopRecording | Use this method to stop recording after a previous call to BeginRecording(Boolean). The manager must already be recording otherwise this method will have no effect. This method must be called before attempting to playback otherwise you may get unpredicatable results.
Public method | Update | Called by Unity. Allows the active replay manager to update recoring or playback.
Top
See Also

Reference

ReplayManager Class


ReplayManager.BeginPlayback Method

ReplayManagerBeginPlayback Method
Use this method to begin the playback of the recorded objects. Use SetPlaybackFrame(Single, PlaybackOrigin) or SetPlaybackFrameNormalized(Single, PlaybackOrigin) before calling this method to specify the exact location at which playback should begin. This method will run the entire playback gathered and then automatically stop playback on completion if endReplayAfterPlayback is true.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void BeginPlayback(
    bool fromStart = true,
    PlaybackDirection direction = PlaybackDirection.Forward
)

Parameters

fromStart (Optional)
Type: SystemBoolean
When true, the replay will be played from the first frame recorded
direction (Optional)
Type: UltimateReplayPlaybackDirection
The direction that the replay should be played
See Also

Reference

ReplayManager Class


ReplayManager.BeginPlaybackFrame Method

ReplayManagerBeginPlaybackFrame Method
Use this method to set the current playback at a specific replay frame. This will allow the state of a specific replay frame to be restored but will not continue playback which will provide a freeze frame effect. Use SetPlaybackFrame(Single, PlaybackOrigin) or SetPlaybackFrameNormalized(Single, PlaybackOrigin) before calling this method to specify the exact location at which the playback frame should be sampled. Use StopPlayback to unfreeze the still frame and return to normal game mode. This method will ignore the value of endReplayAfterPlayback as only a single frame is replayed. As a result you will need to call StopPlayback when you want to end the playback frame.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void BeginPlaybackFrame()
See Also

Reference

ReplayManager Class


ReplayManager.BeginRecording Method

ReplayManagerBeginRecording Method
Use this method to begin sampling the recorded objects in the scene. If recordOnStart is true then this method will be called automatically when the manager is initialized. Any state information will be recored via the assigned ReplayTarget (Default ReplayMemoryTarget). When true, any previous recording data will be discarded

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void BeginRecording(
    bool cleanRecording = true
)

Parameters

cleanRecording (Optional)
Type: SystemBoolean

[Missing <param name="cleanRecording"/> documentation for "M:UltimateReplay.ReplayManager.BeginRecording(System.Boolean)"]

See Also

Reference

ReplayManager Class


ReplayManager.DiscardRecording Method

ReplayManagerDiscardRecording Method
This method will throw away any recorded data and flush the replay target if necessary. This method can be called at any time. If the manager is currently recording then all previous data will be discarded and recording will continue. If the manager is currently replaying then all replay data will be discarded and playback will stop.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void DiscardRecording()
See Also

Reference

ReplayManager Class


ReplayManager.FindReplayPrefab Method

ReplayManagerFindReplayPrefab Method
Attempts to find the prefab with the matching name. This is used to restore objects that were destroyed during recording.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static GameObject FindReplayPrefab(
    string prefabName
)

Parameters

prefabName
Type: SystemString
The name of the prefab to locate

Return Value

Type: GameObject
The matching prefab or null if no matching prefab was found
See Also

Reference

ReplayManager Class


ReplayManager.ForceAwake Method

ReplayManagerForceAwake Method
Override implementation of ForceAwake. Performs exactly the same behaviour. Simply included so that the user does not need to import 'UltimateReplay.Util' to access the method.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void ForceAwake()
See Also

Reference

ReplayManager Class


ReplayManager.OnDestroy Method

ReplayManagerOnDestroy Method
Called by Unity. Allows the active replay manager to cleanup any active recordings.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnDestroy()
See Also

Reference

ReplayManager Class


ReplayManager.OnLevelWasLoaded Method

ReplayManagerOnLevelWasLoaded Method
Called by Unity. Allows the active replay manager to cleanup recordings when a scene change is made.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnLevelWasLoaded(
    int index
)

Parameters

index
Type: SystemInt32
The level id
See Also

Reference

ReplayManager Class


ReplayManager.OnValidate Method

ReplayManagerOnValidate Method
Called by Unity.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnValidate()
See Also

Reference

ReplayManager Class


ReplayManager.PausePlayback Method

ReplayManagerPausePlayback Method
Use this method to pause replay playback while maintinaing the current replay state. See ResumePlayback to continue a playback.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void PausePlayback()
See Also

Reference

ReplayManager Class


ReplayManager.PauseRecording Method

ReplayManagerPauseRecording Method
Use this method when you want to pause recording but may continue recording at any point. A good candidate for pausing recording is when the user pauses the game and is shown a pause menu. The manager must already be recording otherwise this method will have no effect.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void PauseRecording()
See Also

Reference

ReplayManager Class


ReplayManager.RegisterReplayPrefab Method

ReplayManagerRegisterReplayPrefab Method
Attempts to register a game object as a prefab so that the replay system is able to spawn or despawn the object as needed. You only need to do this for objects that are likley to be either instantiated or destroyed during recording. The replay system will then be able to accuratley restore the scene state during playback. The specified object must be a prefab otherwise an error will be thrown and the object will not be registered. Prefab instances are not accepted.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void RegisterReplayPrefab(
    GameObject prefab
)

Parameters

prefab
Type: GameObject
The prefab object to register with the replay system
See Also

Reference

ReplayManager Class


ReplayManager.ReplayDestroy Method

ReplayManagerReplayDestroy Method
Attempts to destroy the specified prefab. OnReplayDestroy will be called if a listener has been registered otherwise default destruction will be used.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void ReplayDestroy(
    GameObject go
)

Parameters

go
Type: GameObject
The game object to destroy
See Also

Reference

ReplayManager Class


ReplayManager.ReplayInstantiate Method

ReplayManagerReplayInstantiate Method
Attempts to instantiate the specified prefab. OnReplayInstantiate will be called if a listener has been registered otherwise default instantiation will be used.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static GameObject ReplayInstantiate(
    GameObject prefab,
    Vector3 position,
    Quaternion rotation
)

Parameters

prefab
Type: GameObject
The prefab to instantiate
position
Type: Vector3
The position to spawn the prefab at
rotation
Type: Quaternion
The rotation to spawn the prefab with

Return Value

Type: GameObject
The new instance of the specified prefab or null if an error occurred
See Also

Reference

ReplayManager Class


ReplayManager.ResumePlayback Method

ReplayManagerResumePlayback Method
Use this method to resume playback after a previous call to PausePlayback was called. If PausePlayback was not called prior to this method then the method will have no effect.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void ResumePlayback()
See Also

Reference

ReplayManager Class


ReplayManager.ResumeRecording Method

ReplayManagerResumeRecording Method
Use this method to resume recording after a previous call to PauseRecording. The manager must already be recording otherwise this method will have no effect.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void ResumeRecording()
See Also

Reference

ReplayManager Class


ReplayManager.SetPlaybackFrame Method

ReplayManagerSetPlaybackFrame Method
Use this method to specify where in the replay sequence the playback should start. If the offset does not lie within the bounds of the replay then the value will be clamped to represent either the start or end frame.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void SetPlaybackFrame(
    float offset,
    PlaybackOrigin origin = PlaybackOrigin.Start
)

Parameters

offset
Type: SystemSingle
The amount of time in seconds to offset the playback
origin (Optional)
Type: UltimateReplayPlaybackOrigin
The playback node to take the offset from. If End is specified then the offset value will be used as a negative offset
See Also

Reference

ReplayManager Class


ReplayManager.SetPlaybackFrameNormalized Method

ReplayManagerSetPlaybackFrameNormalized Method
Use this method to specify where in the replay sequence the playback should start. This method accepts normalized offsets values between 0 and 1 and performs validation before using the value.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void SetPlaybackFrameNormalized(
    float normalizedOffset,
    PlaybackOrigin origin = PlaybackOrigin.Start
)

Parameters

normalizedOffset
Type: SystemSingle
The normalized value representing the offset from the specified origin to start the playback from
origin (Optional)
Type: UltimateReplayPlaybackOrigin
The playback node to take the offset from. If End is specified then the offset value will be used as a negative offset
See Also

Reference

ReplayManager Class


ReplayManager.Start Method

ReplayManagerStart Method
Called by Unity. Allows the active replay manager to initialize.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Start()
See Also

Reference

ReplayManager Class


ReplayManager.StopPlayback Method

ReplayManagerStopPlayback Method
Use this method to stop any active playback. This method will only have an effect if there is an active playback running otherwise it will have no effect.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void StopPlayback()
See Also

Reference

ReplayManager Class


ReplayManager.StopRecording Method

ReplayManagerStopRecording Method
Use this method to stop recording after a previous call to BeginRecording(Boolean). The manager must already be recording otherwise this method will have no effect. This method must be called before attempting to playback otherwise you may get unpredicatable results.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void StopRecording()
See Also

Reference

ReplayManager Class


ReplayManager.Update Method

ReplayManagerUpdate Method
Called by Unity. Allows the active replay manager to update recoring or playback.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Update()
See Also

Reference

ReplayManager Class


ReplayManager Properties

ReplayManager Properties

The ReplayManager type exposes the following members.

Properties
Name | Description
CurrentPlaybackTime | Get the current playback time in seconds. This value will never be greater than duration.
CurrentPlaybackTimeNormalized | Get the current playback time as a normalized value between 0-1. 0 represents the starting frame of the recording and 1 represents the very last frame of the recording.
IsPaused | Returns true when the active replay manager is in any paused state. Paused states could include Playback_Paused or Recording_Paused.
IsRecording | Returns true if the manager is currently recording the scene. Note: If recording is paused this value will still be true.
IsReplaying | Returns true if the manager is currently playing back previously recorded replay data. Note: if playback is paused this value will still be true.
PlaybackDirection | Gets the current PlaybackDirection of replay playback.
Preparer | Access the current IReplayPreparer that the active replay manager will use to prepare game objects for replay. By default a DefaultReplayPreparer is used.
Replay | Get the active replay manager in the scene. If no replay manager could be found then one will be created with default settings. This property may be null in a rare case where the active replay manager was destroyed in the same frame as an application quit event was issued. In this situation the replay manager cannot be recreated as it would cause leaked objects.
Scene | Get the ReplayScene associated with the replay system.
Target | The current replay target that is being used to store the replay data. By default, the replay target is ReplayMemoryTarget.
Top
See Also

Reference

ReplayManager Class


ReplayManager.CurrentPlaybackTime Property

ReplayManagerCurrentPlaybackTime Property
Get the current playback time in seconds. This value will never be greater than duration.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float CurrentPlaybackTime { get; }

Property Value

Type: Single
See Also

Reference

ReplayManager Class


ReplayManager.CurrentPlaybackTimeNormalized Property

ReplayManagerCurrentPlaybackTimeNormalized Property
Get the current playback time as a normalized value between 0-1. 0 represents the starting frame of the recording and 1 represents the very last frame of the recording.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float CurrentPlaybackTimeNormalized { get; }

Property Value

Type: Single
See Also

Reference

ReplayManager Class


ReplayManager.IsPaused Property

ReplayManagerIsPaused Property
Returns true when the active replay manager is in any paused state. Paused states could include Playback_Paused or Recording_Paused.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool IsPaused { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayManager Class


ReplayManager.IsRecording Property

ReplayManagerIsRecording Property
Returns true if the manager is currently recording the scene. Note: If recording is paused this value will still be true.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool IsRecording { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayManager Class


ReplayManager.IsReplaying Property

ReplayManagerIsReplaying Property
Returns true if the manager is currently playing back previously recorded replay data. Note: if playback is paused this value will still be true.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool IsReplaying { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayManager Class


ReplayManager.PlaybackDirection Property

ReplayManagerPlaybackDirection Property
Gets the current PlaybackDirection of replay playback.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static PlaybackDirection PlaybackDirection { get; }

Property Value

Type: PlaybackDirection
See Also

Reference

ReplayManager Class


ReplayManager.Preparer Property

ReplayManagerPreparer Property
Access the current IReplayPreparer that the active replay manager will use to prepare game objects for replay. By default a DefaultReplayPreparer is used.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static IReplayPreparer Preparer { get; set; }

Property Value

Type: IReplayPreparer
See Also

Reference

ReplayManager Class


ReplayManager.Replay Property

ReplayManagerReplay Property
Get the active replay manager in the scene. If no replay manager could be found then one will be created with default settings. This property may be null in a rare case where the active replay manager was destroyed in the same frame as an application quit event was issued. In this situation the replay manager cannot be recreated as it would cause leaked objects.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static ReplayManager Replay { get; }

Property Value

Type: ReplayManager
See Also

Reference

ReplayManager Class


ReplayManager.Scene Property

ReplayManagerScene Property
Get the ReplayScene associated with the replay system.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static ReplayScene Scene { get; }

Property Value

Type: ReplayScene
See Also

Reference

ReplayManager Class


ReplayManager.Target Property

ReplayManagerTarget Property
The current replay target that is being used to store the replay data. By default, the replay target is ReplayMemoryTarget.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static ReplayTarget Target { get; set; }

Property Value

Type: ReplayTarget
See Also

Reference

ReplayManager Class


ReplayObject Class

ReplayObject Class
Only one instance of ReplayObject can be added to any game object.
Inheritance Hierarchy
SystemObject
Object
Component
Behaviour
MonoBehaviour
UltimateReplayReplayObject

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public sealed class ReplayObject : MonoBehaviour,
    IReplaySerialize

The ReplayObject type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayObject | Initializes a new instance of the ReplayObject class
Top
Methods
 | Name | Description
Public method | Awake | Called by Unity.
Public method | OnDestroy | Called by Unity.
Public method | OnReplayDeserialize | Called by the replay system when this ReplayObject should deserialize its replay data.
Public method | OnReplaySerialize | Called by the replay system when this ReplayObject should serialize its replay data.
Public method | RebuildComponentList | Forces the object to refresh its list of observed components. Observed components are components which inherit from ReplayBehaviour and exist on either this game object or a child of this game object.
Top
Fields
 | Name | Description
Public field | observedComponents | An array of ReplayBehaviour components that this object will serialize during recording. Dynamically adding replay components during recording is not supported.
Top
Properties
 | Name | Description
Public property | IsPrefab | Returns true when this game object is a prefab asset. Returns false when this game object is a scene object or prefab instance.
Public property | PrefabIdentity | Get the prefab associated with this ReplayObject.
Public property | ReplayIdentity | Get the unique ReplayIdentity for this ReplayObject.
Top
See Also

Reference


ReplayObject Constructor

ReplayObject Constructor
Initializes a new instance of the ReplayObject class

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayObject()
See Also

Reference

ReplayObject Class


ReplayObject Fields

ReplayObject Fields

The ReplayObject type exposes the following members.

Fields
 | Name | Description
Public field | observedComponents | An array of ReplayBehaviour components that this object will serialize during recording. Dynamically adding replay components during recording is not supported.
Top
See Also

Reference

ReplayObject Class


ReplayObject.observedComponents Field

ReplayObjectobservedComponents Field
An array of ReplayBehaviour components that this object will serialize during recording. Dynamically adding replay components during recording is not supported.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayBehaviour[] observedComponents

Field Value

Type: ReplayBehaviour
See Also

Reference

ReplayObject Class


ReplayObject Methods

ReplayObject Methods

The ReplayObject type exposes the following members.

Methods
 | Name | Description
Public method | Awake | Called by Unity.
Public method | OnDestroy | Called by Unity.
Public method | OnReplayDeserialize | Called by the replay system when this ReplayObject should deserialize its replay data.
Public method | OnReplaySerialize | Called by the replay system when this ReplayObject should serialize its replay data.
Public method | RebuildComponentList | Forces the object to refresh its list of observed components. Observed components are components which inherit from ReplayBehaviour and exist on either this game object or a child of this game object.
Top
See Also

Reference

ReplayObject Class


ReplayObject.Awake Method

ReplayObjectAwake Method
Called by Unity.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Awake()
See Also

Reference

ReplayObject Class


ReplayObject.OnDestroy Method

ReplayObjectOnDestroy Method
Called by Unity.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnDestroy()
See Also

Reference

ReplayObject Class


ReplayObject.OnReplayDeserialize Method

ReplayObjectOnReplayDeserialize Method
Called by the replay system when this ReplayObject should deserialize its replay data.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplayDeserialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to deserialize the data from

Implements

IReplaySerializeOnReplayDeserialize(ReplayState)
See Also

Reference

ReplayObject Class


ReplayObject.OnReplaySerialize Method

ReplayObjectOnReplaySerialize Method
Called by the replay system when this ReplayObject should serialize its replay data.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplaySerialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to serialize the data to

Implements

IReplaySerializeOnReplaySerialize(ReplayState)
See Also

Reference

ReplayObject Class


ReplayObject.RebuildComponentList Method

ReplayObjectRebuildComponentList Method
Forces the object to refresh its list of observed components. Observed components are components which inherit from ReplayBehaviour and exist on either this game object or a child of this game object.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RebuildComponentList()
See Also

Reference

ReplayObject Class


ReplayObject Properties

ReplayObject Properties

The ReplayObject type exposes the following members.

Properties
 | Name | Description
Public property | IsPrefab | Returns true when this game object is a prefab asset. Returns false when this game object is a scene object or prefab instance.
Public property | PrefabIdentity | Get the prefab associated with this ReplayObject.
Public property | ReplayIdentity | Get the unique ReplayIdentity for this ReplayObject.
Top
See Also

Reference

ReplayObject Class


ReplayObject.IsPrefab Property

ReplayObjectIsPrefab Property
Returns true when this game object is a prefab asset. Returns false when this game object is a scene object or prefab instance.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsPrefab { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayObject Class


ReplayObject.PrefabIdentity Property

ReplayObjectPrefabIdentity Property
Get the prefab associated with this ReplayObject.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string PrefabIdentity { get; }

Property Value

Type: String
See Also

Reference

ReplayObject Class


ReplayObject.ReplayIdentity Property

ReplayObjectReplayIdentity Property
Get the unique ReplayIdentity for this ReplayObject.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayIdentity ReplayIdentity { get; }

Property Value

Type: ReplayIdentity
See Also

Reference

ReplayObject Class


ReplayState Class

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#
Copy
public sealed class ReplayState

The ReplayState type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayState | Create an empty ReplayState that can be written to.
Top
Methods
 | Name | Description
Public method | Clear | Clears all buffered data from this ReplayState and resets its state.
Public method | Read16 | Read a short from the state.
Public method | Read32 | Read an int from the state.
Public method | ReadBool | Read a bool from the state.
Public method | ReadByte | Read a byte from the state.
Public method | ReadBytes(Int32) | Read a byte array from the state.
Public method | ReadBytes(Byte, Int32, Int32) | Fill a byte array with data from the state.
Public method | ReadColor | Read a colour from the state.
Public method | ReadColor32 | Read a colour32 from the state.
Public method | ReadFloat | Read a float from the state.
Public method | ReadFloatLowPrecision | Attempts to read a low precision float. You should only use this method when the value is relativley small (less than 65000).
Public method | ReadIdentity | Read a ReplayIdentity from the state.
Public method | ReadQuat | Read a quaternion from the state.
Public method | ReadState | Read the specified amount of bytes as a new ReplayState.
Public method | ReadString | Read a string from the state
Public method | ReadVec2 | Read a vector2 from the state.
Public method | ReadVec3 | Read a vector3 from the state.
Public method | ReadVec4 | Read a vector4 from the state.
Public method | ToArray | Get the ReplayState data as a byte array.
Public method | TryReadObject | Attempts to read an object state from this ReplayState.
Public method | TryWriteObject | 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 method | Write(Boolean) | Write a bool to the state.
Public method | Write(Byte) | Write a byte to the state.
Public method | Write(Byte) | Write a byte array to the state.
Public method | Write(Int16) | Write a short to the state.
Public method | Write(Int32) | Write an int to the state.
Public method | Write(Single) | Write a float to the state.
Public method | Write(String) | Write a string to the state.
Public method | Write(Color) | Write a colour to the state.
Public method | Write(Color32) | Write a colour32 value to the state.
Public method | Write(Quaternion) | Write a quaternion to the state.
Public method | Write(Vector2) | Write a vector2 to the state.
Public method | Write(Vector3) | Write a vector3 to the state.
Public method | Write(Vector4) | Write a vector4 to the state.
Public method | Write(ReplayIdentity) | Write the specified replay identity to this ReplayState.
Public method | Write(ReplayState) | Write the entire contents of a ReplayState to this ReplayState. All bytes will be appended.
Public method | Write(Byte, Int32, Int32) | Write a byte array to the state using an offset position and length.
Public method | WriteLowPrecision | 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
 | Name | Description
Public property | CanRead | Returns true if the state contains any more data.
Public property | EndRead | 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 property | Size | Returns the size of the object state in bytes.
Top
See Also

Reference


ReplayState Constructor

ReplayState Constructor
Create an empty ReplayState that can be written to.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayState()
See Also

Reference

ReplayState Class


ReplayState Methods

ReplayState Methods

The ReplayState type exposes the following members.

Methods
 | Name | Description
Public method | Clear | Clears all buffered data from this ReplayState and resets its state.
Public method | Read16 | Read a short from the state.
Public method | Read32 | Read an int from the state.
Public method | ReadBool | Read a bool from the state.
Public method | ReadByte | Read a byte from the state.
Public method | ReadBytes(Int32) | Read a byte array from the state.
Public method | ReadBytes(Byte, Int32, Int32) | Fill a byte array with data from the state.
Public method | ReadColor | Read a colour from the state.
Public method | ReadColor32 | Read a colour32 from the state.
Public method | ReadFloat | Read a float from the state.
Public method | ReadFloatLowPrecision | Attempts to read a low precision float. You should only use this method when the value is relativley small (less than 65000).
Public method | ReadIdentity | Read a ReplayIdentity from the state.
Public method | ReadQuat | Read a quaternion from the state.
Public method | ReadState | Read the specified amount of bytes as a new ReplayState.
Public method | ReadString | Read a string from the state
Public method | ReadVec2 | Read a vector2 from the state.
Public method | ReadVec3 | Read a vector3 from the state.
Public method | ReadVec4 | Read a vector4 from the state.
Public method | ToArray | Get the ReplayState data as a byte array.
Public method | TryReadObject | Attempts to read an object state from this ReplayState.
Public method | TryWriteObject | 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 method | Write(Boolean) | Write a bool to the state.
Public method | Write(Byte) | Write a byte to the state.
Public method | Write(Byte) | Write a byte array to the state.
Public method | Write(Int16) | Write a short to the state.
Public method | Write(Int32) | Write an int to the state.
Public method | Write(Single) | Write a float to the state.
Public method | Write(String) | Write a string to the state.
Public method | Write(Color) | Write a colour to the state.
Public method | Write(Color32) | Write a colour32 value to the state.
Public method | Write(Quaternion) | Write a quaternion to the state.
Public method | Write(Vector2) | Write a vector2 to the state.
Public method | Write(Vector3) | Write a vector3 to the state.
Public method | Write(Vector4) | Write a vector4 to the state.
Public method | Write(ReplayIdentity) | Write the specified replay identity to this ReplayState.
Public method | Write(ReplayState) | Write the entire contents of a ReplayState to this ReplayState. All bytes will be appended.
Public method | Write(Byte, Int32, Int32) | Write a byte array to the state using an offset position and length.
Public method | WriteLowPrecision | 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
See Also

Reference

ReplayState Class


ReplayState.Clear Method

ReplayStateClear Method
Clears all buffered data from this ReplayState and resets its state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Clear()
See Also

Reference

ReplayState Class


ReplayState.Read16 Method

ReplayStateRead16 Method
Read a short from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public short Read16()

Return Value

Type: Int16
Short value
See Also

Reference

ReplayState Class


ReplayState.Read32 Method

ReplayStateRead32 Method
Read an int from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int Read32()

Return Value

Type: Int32
Int value
See Also

Reference

ReplayState Class


ReplayState.ReadBool Method

ReplayStateReadBool Method
Read a bool from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ReadBool()

Return Value

Type: Boolean
Bool value
See Also

Reference

ReplayState Class


ReplayState.ReadByte Method

ReplayStateReadByte Method
Read a byte from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public byte ReadByte()

Return Value

Type: Byte
Byte value
See Also

Reference

ReplayState Class


ReplayState.ReadBytes Method

ReplayStateReadBytes Method
Overload List
 | Name | Description
Public method | ReadBytes(Int32) | Read a byte array from the state.
Public method | ReadBytes(Byte, Int32, Int32) | Fill a byte array with data from the state.
Top
See Also

Reference

ReplayState Class


ReplayState.ReadBytes Method (Int32)

ReplayStateReadBytes Method (Int32)
Read a byte array from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public byte[] ReadBytes(
    int amount
)

Parameters

amount
Type: SystemInt32
The number of bytes to read

Return Value

Type: Byte
Byte array value
See Also

Reference

ReplayState Class
ReadBytes Overload


ReplayState.ReadBytes Method (Byte[], Int32, Int32)

ReplayStateReadBytes Method (Byte, Int32, Int32)
Fill a byte array with data from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void ReadBytes(
    byte[] buffer,
    int offset,
    int amount
)

Parameters

buffer
Type: SystemByte
The byte array to store data in
offset
Type: SystemInt32
The index offset to start filling the buffer at
amount
Type: SystemInt32
The number of bytes to read
See Also

Reference

ReplayState Class
ReadBytes Overload


ReplayState.ReadColor Method

ReplayStateReadColor Method
Read a colour from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Color ReadColor()

Return Value

Type: Color
Colour value
See Also

Reference

ReplayState Class


ReplayState.ReadColor32 Method

ReplayStateReadColor32 Method
Read a colour32 from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Color32 ReadColor32()

Return Value

Type: Color32
Colour32 value
See Also

Reference

ReplayState Class


ReplayState.ReadFloat Method

ReplayStateReadFloat Method
Read a float from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float ReadFloat()

Return Value

Type: Single
Float value
See Also

Reference

ReplayState Class


ReplayState.ReadFloatLowPrecision Method

ReplayStateReadFloatLowPrecision Method
Attempts to read a low precision float. You should only use this method when the value is relativley small (less than 65000).

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float ReadFloatLowPrecision()

Return Value

Type: Single
float value
See Also

Reference

ReplayState Class


ReplayState.ReadIdentity Method

ReplayStateReadIdentity Method
Read a ReplayIdentity from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayIdentity ReadIdentity()

Return Value

Type: ReplayIdentity
Identity value
See Also

Reference

ReplayState Class


ReplayState.ReadQuat Method

ReplayStateReadQuat Method
Read a quaternion from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Quaternion ReadQuat()

Return Value

Type: Quaternion
Quaternion value
See Also

Reference

ReplayState Class


ReplayState.ReadState Method

ReplayStateReadState Method
Read the specified amount of bytes as a new ReplayState.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayState ReadState(
    int bytes
)

Parameters

bytes
Type: SystemInt32
The amount of bytes to read into the state

Return Value

Type: ReplayState
A new ReplayState containing the specified number of bytes
See Also

Reference

ReplayState Class


ReplayState.ReadString Method

ReplayStateReadString Method
Read a string from the state

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string ReadString()

Return Value

Type: String
string value
See Also

Reference

ReplayState Class


ReplayState.ReadVec2 Method

ReplayStateReadVec2 Method
Read a vector2 from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector2 ReadVec2()

Return Value

Type: Vector2
Vector2 value
See Also

Reference

ReplayState Class


ReplayState.ReadVec3 Method

ReplayStateReadVec3 Method
Read a vector3 from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector3 ReadVec3()

Return Value

Type: Vector3
Vector3 value
See Also

Reference

ReplayState Class


ReplayState.ReadVec4 Method

ReplayStateReadVec4 Method
Read a vector4 from the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Vector4 ReadVec4()

Return Value

Type: Vector4
Vector4 value
See Also

Reference

ReplayState Class


ReplayState.ToArray Method

ReplayStateToArray Method
Get the ReplayState data as a byte array.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public byte[] ToArray()

Return Value

Type: Byte
A byte array of data
See Also

Reference

ReplayState Class


ReplayState.TryReadObject Method

ReplayStateTryReadObject Method
Attempts to read an object state from this ReplayState.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Object TryReadObject()

Return Value

Type: Object
The state data for the object
See Also

Reference

ReplayState Class


ReplayState.TryWriteObject Method

ReplayStateTryWriteObject Method
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.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void TryWriteObject(
    Object value
)

Parameters

value
Type: SystemObject
The object to write to the state
See Also

Reference

ReplayState Class


ReplayState.Write Method

ReplayStateWrite Method
Overload List
 | Name | Description
Public method | Write(Boolean) | Write a bool to the state.
Public method | Write(Byte) | Write a byte to the state.
Public method | Write(Byte) | Write a byte array to the state.
Public method | Write(Int16) | Write a short to the state.
Public method | Write(Int32) | Write an int to the state.
Public method | Write(Single) | Write a float to the state.
Public method | Write(String) | Write a string to the state.
Public method | Write(Color) | Write a colour to the state.
Public method | Write(Color32) | Write a colour32 value to the state.
Public method | Write(Quaternion) | Write a quaternion to the state.
Public method | Write(Vector2) | Write a vector2 to the state.
Public method | Write(Vector3) | Write a vector3 to the state.
Public method | Write(Vector4) | Write a vector4 to the state.
Public method | Write(ReplayIdentity) | Write the specified replay identity to this ReplayState.
Public method | Write(ReplayState) | Write the entire contents of a ReplayState to this ReplayState. All bytes will be appended.
Public method | Write(Byte, Int32, Int32) | Write a byte array to the state using an offset position and length.
Top
See Also

Reference

ReplayState Class


ReplayState.Write Method (Boolean)

ReplayStateWrite Method (Boolean)
Write a bool to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    bool value
)

Parameters

value
Type: SystemBoolean
bool value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Byte)

ReplayStateWrite Method (Byte)
Write a byte to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    byte value
)

Parameters

value
Type: SystemByte
Byte value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Byte[])

ReplayStateWrite Method (Byte)
Write a byte array to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    byte[] bytes
)

Parameters

bytes
Type: SystemByte
Byte array value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Int16)

ReplayStateWrite Method (Int16)
Write a short to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    short value
)

Parameters

value
Type: SystemInt16
Short value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Int32)

ReplayStateWrite Method (Int32)
Write an int to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    int value
)

Parameters

value
Type: SystemInt32
Int value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Single)

ReplayStateWrite Method (Single)
Write a float to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    float value
)

Parameters

value
Type: SystemSingle
Float value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (String)

ReplayStateWrite Method (String)
Write a string to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    string value
)

Parameters

value
Type: SystemString
string value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Color)

ReplayStateWrite Method (Color)
Write a colour to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    Color value
)

Parameters

value
Type: Color
Colour value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Color32)

ReplayStateWrite Method (Color32)
Write a colour32 value to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    Color32 value
)

Parameters

value
Type: Color32
Colour32 value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Quaternion)

ReplayStateWrite Method (Quaternion)
Write a quaternion to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    Quaternion value
)

Parameters

value
Type: Quaternion
Quaternion value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Vector2)

ReplayStateWrite Method (Vector2)
Write a vector2 to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    Vector2 value
)

Parameters

value
Type: Vector2
Vector2 value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Vector3)

ReplayStateWrite Method (Vector3)
Write a vector3 to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    Vector3 value
)

Parameters

value
Type: Vector3
Vector3 value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Vector4)

ReplayStateWrite Method (Vector4)
Write a vector4 to the state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    Vector4 value
)

Parameters

value
Type: Vector4
Vector4 value
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (ReplayIdentity)

ReplayStateWrite Method (ReplayIdentity)
Write the specified replay identity to this ReplayState.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    ReplayIdentity identity
)

Parameters

identity
Type: UltimateReplay.CoreReplayIdentity
The identity to write
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (ReplayState)

ReplayStateWrite Method (ReplayState)
Write the entire contents of a ReplayState to this ReplayState. All bytes will be appended.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    ReplayState other
)

Parameters

other
Type: UltimateReplayReplayState
The other state to append
See Also

Reference

ReplayState Class
Write Overload


ReplayState.Write Method (Byte[], Int32, Int32)

ReplayStateWrite Method (Byte, Int32, Int32)
Write a byte array to the state using an offset position and length.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Write(
    byte[] bytes,
    int offset,
    int length
)

Parameters

bytes
Type: SystemByte
Byte array value
offset
Type: SystemInt32
The start index to read data from the array
length
Type: SystemInt32
The amount of data to read
See Also

Reference

ReplayState Class
Write Overload


ReplayState.WriteLowPrecision Method

ReplayStateWriteLowPrecision Method
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.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void WriteLowPrecision(
    float value
)

Parameters

value
Type: SystemSingle
float value
See Also

Reference

ReplayState Class


ReplayState Properties

ReplayState Properties

The ReplayState type exposes the following members.

Properties
 | Name | Description
Public property | CanRead | Returns true if the state contains any more data.
Public property | EndRead | 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 property | Size | Returns the size of the object state in bytes.
Top
See Also

Reference

ReplayState Class


ReplayState.CanRead Property

ReplayStateCanRead Property
Returns true if the state contains any more data.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool CanRead { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayState Class


ReplayState.EndRead Property

ReplayStateEndRead Property
Returns true if the read pointer is at the end of the buffered data or false if there is still data to be read.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool EndRead { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayState Class


ReplayState.Size Property

ReplayStateSize Property
Returns the size of the object state in bytes.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int Size { get; }

Property Value

Type: Int32
See Also

Reference

ReplayState Class


ReplayTime Class

ReplayTime Class
This class emulates the behaviour of the Time class in Unity and can be used to modify the playback speed of a replay. There are also delta values that can be used to interpolate between frames where a low record frame rate is used. See ReplayTransform for an example.
Inheritance Hierarchy
SystemObject
UltimateReplayReplayTime

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static class ReplayTime

The ReplayTime type exposes the following members.

Methods
Name | Description
GetCorrectedTimeValueString | Gets the current time as a float and converts it to minutes and seconds formatted as a string.
Top
Properties
Name | Description
Delta | Represents a delta between current replay frames. This normalized value can be used to interpolate smoothly between replay states where a low record rate is used. Note: this value is not the actual delta time but a value representing the transition progress between replay frames.
Time | Get the current replay playback time.
TimeScale | The time scale value used during replay playback. This value is ignored during replay recording.
Top
See Also

Reference


ReplayTime Methods

ReplayTime Methods

The ReplayTime type exposes the following members.

Methods
Name | Description
GetCorrectedTimeValueString | Gets the current time as a float and converts it to minutes and seconds formatted as a string.
Top
See Also

Reference

ReplayTime Class


ReplayTime.GetCorrectedTimeValueString Method

ReplayTimeGetCorrectedTimeValueString Method
Gets the current time as a float and converts it to minutes and seconds formatted as a string.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static string GetCorrectedTimeValueString(
    float timeValue
)

Parameters

timeValue
Type: SystemSingle
The time value input, for example: Time.time

Return Value

Type: String
A formatted time string
See Also

Reference

ReplayTime Class


ReplayTime Properties

ReplayTime Properties

The ReplayTime type exposes the following members.

Properties
Name | Description
Delta | Represents a delta between current replay frames. This normalized value can be used to interpolate smoothly between replay states where a low record rate is used. Note: this value is not the actual delta time but a value representing the transition progress between replay frames.
Time | Get the current replay playback time.
TimeScale | The time scale value used during replay playback. This value is ignored during replay recording.
Top
See Also

Reference

ReplayTime Class


ReplayTime.Delta Property

ReplayTimeDelta Property
Represents a delta between current replay frames. This normalized value can be used to interpolate smoothly between replay states where a low record rate is used. Note: this value is not the actual delta time but a value representing the transition progress between replay frames.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float Delta { get; }

Property Value

Type: Single
See Also

Reference

ReplayTime Class


ReplayTime.Time Property

ReplayTimeTime Property
Get the current replay playback time.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float Time { get; }

Property Value

Type: Single
See Also

Reference

ReplayTime Class


ReplayTime.TimeScale Property

ReplayTimeTimeScale Property
The time scale value used during replay playback. This value is ignored during replay recording.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float TimeScale { get; set; }

Property Value

Type: Single
See Also

Reference

ReplayTime Class


ReplayTransform Class

ReplayTransform Class
Attach this component to a game objects in order to record the objects transform for replays. Only one instance of ReplayTransform can be added to any game object.
Inheritance Hierarchy
SystemObject
Object
Component
Behaviour
MonoBehaviour
UltimateReplayReplayBehaviour
UltimateReplayReplayTransform

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class ReplayTransform : ReplayBehaviour

The ReplayTransform type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayTransform | Initializes a new instance of the ReplayTransform class
Top
Methods
 | Name | Description
Public method | OnReplayDeserialize | Called by the relay system when the object should return to a previous state. (Overrides ReplayBehaviourOnReplayDeserialize(ReplayState).)
Public method | OnReplaySerialize | Called by the replay system when the object should be recorded. (Overrides ReplayBehaviourOnReplaySerialize(ReplayState).)
Public method | OnReplayUpdate | Called during playback and allows the transform to be interpolated to provide a smooth replay even if lower record rates are used. (Overrides ReplayBehaviourOnReplayUpdate.)
Public method | Start | Called by Unity.
Top
Fields
 | Name | Description
Public field | interpolate | Should the transform be interpolated between states. This is recommended when low record rates are used as without interpolation the playback can seem jumpy.
Public field | recordPosition | Should the position value of the transform be recorded.
Public field | recordRotation | Should the rotation value of the transform be recorded.
Public field | recordScale | Should the scale value of the transform be recorded.
Top
See Also

Reference


ReplayTransform Constructor

ReplayTransform Constructor
Initializes a new instance of the ReplayTransform class

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayTransform()
See Also

Reference

ReplayTransform Class


ReplayTransform Fields

ReplayTransform Fields

The ReplayTransform type exposes the following members.

Fields
 | Name | Description
Public field | interpolate | Should the transform be interpolated between states. This is recommended when low record rates are used as without interpolation the playback can seem jumpy.
Public field | recordPosition | Should the position value of the transform be recorded.
Public field | recordRotation | Should the rotation value of the transform be recorded.
Public field | recordScale | Should the scale value of the transform be recorded.
Top
See Also

Reference

ReplayTransform Class


ReplayTransform.interpolate Field

ReplayTransforminterpolate Field
Should the transform be interpolated between states. This is recommended when low record rates are used as without interpolation the playback can seem jumpy.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool interpolate

Field Value

Type: Boolean
See Also

Reference

ReplayTransform Class


ReplayTransform.recordPosition Field

ReplayTransformrecordPosition Field
Should the position value of the transform be recorded.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool recordPosition

Field Value

Type: Boolean
See Also

Reference

ReplayTransform Class


ReplayTransform.recordRotation Field

ReplayTransformrecordRotation Field
Should the rotation value of the transform be recorded.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool recordRotation

Field Value

Type: Boolean
See Also

Reference

ReplayTransform Class


ReplayTransform.recordScale Field

ReplayTransformrecordScale Field
Should the scale value of the transform be recorded.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool recordScale

Field Value

Type: Boolean
See Also

Reference

ReplayTransform Class


ReplayTransform Methods

ReplayTransform Methods

The ReplayTransform type exposes the following members.

Methods
 | Name | Description
Public method | OnReplayDeserialize | Called by the relay system when the object should return to a previous state. (Overrides ReplayBehaviourOnReplayDeserialize(ReplayState).)
Public method | OnReplaySerialize | Called by the replay system when the object should be recorded. (Overrides ReplayBehaviourOnReplaySerialize(ReplayState).)
Public method | OnReplayUpdate | Called during playback and allows the transform to be interpolated to provide a smooth replay even if lower record rates are used. (Overrides ReplayBehaviourOnReplayUpdate.)
Public method | Start | Called by Unity.
Top
See Also

Reference

ReplayTransform Class


ReplayTransform.OnReplayDeserialize Method

ReplayTransformOnReplayDeserialize Method
Called by the relay system when the object should return to a previous state.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void OnReplayDeserialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The state object to deserialize the transform from

Implements

IReplaySerializeOnReplayDeserialize(ReplayState)
See Also

Reference

ReplayTransform Class


ReplayTransform.OnReplaySerialize Method

ReplayTransformOnReplaySerialize Method
Called by the replay system when the object should be recorded.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void OnReplaySerialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The state object to serialize the transform into

Implements

IReplaySerializeOnReplaySerialize(ReplayState)
See Also

Reference

ReplayTransform Class


ReplayTransform.OnReplayUpdate Method

ReplayTransformOnReplayUpdate Method
Called during playback and allows the transform to be interpolated to provide a smooth replay even if lower record rates are used.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void OnReplayUpdate()
See Also

Reference

ReplayTransform Class


ReplayTransform.Start Method

ReplayTransformStart Method
Called by Unity.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Start()
See Also

Reference

ReplayTransform Class


ReplayVarAttribute Class

ReplayVarAttribute Class
Use this attribute on a field to mark it for recording. The type the field is defined in must inheit from ReplayBehaviour in order for the field to be recorded automatically. Interpolation between field values is also possible where low record rates are used.
Inheritance Hierarchy
SystemObject
SystemAttribute
UltimateReplayReplayVarAttribute

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

The ReplayVarAttribute type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayVarAttribute | Create a new ReplayVarAttribute for a field.
Top
Fields
 | Name | Description
Public field | interpolate | Should the value of the field be interpolated between frames or should the value snap to the exact frame value. Most built-in types support interpolation such as Byte and Single. Basic Unity types such as Vector2 and Color also support interpolation.
Top
See Also

Reference


ReplayVarAttribute Constructor

ReplayVarAttribute Constructor
Create a new ReplayVarAttribute for a field.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayVarAttribute(
    bool interpolated = true
)

Parameters

interpolated (Optional)
Type: SystemBoolean
Should the field value be interpolated between frames
See Also

Reference

ReplayVarAttribute Class


ReplayVarAttribute Fields

ReplayVarAttribute Fields

The ReplayVarAttribute type exposes the following members.

Fields
 | Name | Description
Public field | interpolate | Should the value of the field be interpolated between frames or should the value snap to the exact frame value. Most built-in types support interpolation such as Byte and Single. Basic Unity types such as Vector2 and Color also support interpolation.
Top
See Also

Reference

ReplayVarAttribute Class


ReplayVarAttribute.interpolate Field

ReplayVarAttributeinterpolate Field
Should the value of the field be interpolated between frames or should the value snap to the exact frame value. Most built-in types support interpolation such as Byte and Single. Basic Unity types such as Vector2 and Color also support interpolation.

Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool interpolate

Field Value

Type: Boolean
See Also

Reference

ReplayVarAttribute Class


UltimateReplay.Core Namespace

UltimateReplay.Core Namespace
Classes
 | Class | Description
Public class | DefaultReplayPreparer | The default IReplayPreparer used by Ultimate Replay to prepare game objects for gameplay and playback.
Public class | ReplayIdentity | A replay identity is an essential component in the Ultimate Replay system and is used to identify replay objects between sessions. Replay identities are assigned at edit time where possible and will never change values. Replay identities are also use to identify prefab instances that are spawned during a replay.
Public class | ReplayScene | A ReplayScene contains information about all active replay objects.
Public class | ReplayVariable | Represents a variable that can be recorded using the replay system in order to replay script animations or similar during playback.
Structures
 | Structure | Description
Public structure | ReplayEvent | Used to mark key recording events that will be triggered during playback. Good candidates would be to trigger audio effects or similar.
Interfaces
 | Interface | Description
Public interface | IReplayPreparer | A preparer is used by Ultimate Replay to prepare any replay objects for either gameplay mode or playback mode. In order for game systems such as physics and scritps to not affect playback, replay objects must be prepared in some way to disable these systems while playback is enabled. The appropriate prepare method will be called by the replay system when objects need to either enter playback mode or return to gameplay mode.
Public interface | IReplaySerialize | This class should be implemented when you want to serialize custom replay data. This sould really be an interface but it needs to be a class to be assignable in the inspector.
Enumerations
 | Enumeration | Description
Public enumeration | ReplayEvents | Common events identifiers used to record ReplayEvent with the replay system.


DefaultReplayPreparer Class

DefaultReplayPreparer Class
The default IReplayPreparer used by Ultimate Replay to prepare game objects for gameplay and playback.
Inheritance Hierarchy
SystemObject
UltimateReplay.CoreDefaultReplayPreparer

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public class DefaultReplayPreparer : IReplayPreparer

The DefaultReplayPreparer type exposes the following members.

Constructors
 | Name | Description
Public method | DefaultReplayPreparer | Initializes a new instance of the DefaultReplayPreparer class
Top
Methods
 | Name | Description
Public method | PrepareComponentForGameplay | Prepare the specified component for gameplay mode.
Public method | PrepareComponentForPlayback | Prepare the specified component for playback mode.
Public method | PrepareForGameplay | Prepare the specified replay object for gameplay mode.
Public method | PrepareForPlayback | Prepare the specified replay object for playback mode.
Top
See Also

Reference

UltimateReplay.Core Namespace


DefaultReplayPreparer Constructor

DefaultReplayPreparer Constructor
Initializes a new instance of the DefaultReplayPreparer class

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public DefaultReplayPreparer()
See Also

Reference

DefaultReplayPreparer Class
UltimateReplay.Core Namespace


DefaultReplayPreparer Methods

DefaultReplayPreparer Methods

The DefaultReplayPreparer type exposes the following members.

Methods
 | Name | Description
Public method | PrepareComponentForGameplay | Prepare the specified component for gameplay mode.
Public method | PrepareComponentForPlayback | Prepare the specified component for playback mode.
Public method | PrepareForGameplay | Prepare the specified replay object for gameplay mode.
Public method | PrepareForPlayback | Prepare the specified replay object for playback mode.
Top
See Also

Reference

DefaultReplayPreparer Class
UltimateReplay.Core Namespace


DefaultReplayPreparer.PrepareComponentForGameplay Method

DefaultReplayPreparerPrepareComponentForGameplay Method
Prepare the specified component for gameplay mode.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void PrepareComponentForGameplay(
    Component component
)

Parameters

component
Type: Component
The component to prepare
See Also

Reference

DefaultReplayPreparer Class
UltimateReplay.Core Namespace


DefaultReplayPreparer.PrepareComponentForPlayback Method

DefaultReplayPreparerPrepareComponentForPlayback Method
Prepare the specified component for playback mode.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void PrepareComponentForPlayback(
    Component component
)

Parameters

component
Type: Component
The component to prepare
See Also

Reference

DefaultReplayPreparer Class
UltimateReplay.Core Namespace


DefaultReplayPreparer.PrepareForGameplay Method

DefaultReplayPreparerPrepareForGameplay Method
Prepare the specified replay object for gameplay mode.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void PrepareForGameplay(
    ReplayObject replayObject
)

Parameters

replayObject
Type: UltimateReplayReplayObject
The replay object to prepare

Implements

IReplayPreparerPrepareForGameplay(ReplayObject)
See Also

Reference

DefaultReplayPreparer Class
UltimateReplay.Core Namespace


DefaultReplayPreparer.PrepareForPlayback Method

DefaultReplayPreparerPrepareForPlayback Method
Prepare the specified replay object for playback mode.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void PrepareForPlayback(
    ReplayObject replayObject
)

Parameters

replayObject
Type: UltimateReplayReplayObject
The replay object to prepare

Implements

IReplayPreparerPrepareForPlayback(ReplayObject)
See Also

Reference

DefaultReplayPreparer Class
UltimateReplay.Core Namespace


IReplayPreparer Interface

IReplayPreparer Interface
A preparer is used by Ultimate Replay to prepare any replay objects for either gameplay mode or playback mode. In order for game systems such as physics and scritps to not affect playback, replay objects must be prepared in some way to disable these systems while playback is enabled. The appropriate prepare method will be called by the replay system when objects need to either enter playback mode or return to gameplay mode.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public interface IReplayPreparer

The IReplayPreparer type exposes the following members.

Methods
 | Name | Description
Public method | PrepareForGameplay | Prepares the specified replay object for gameplay. The implementing type should restore all game systems that affect the replay object so that the object is in its original state. This method will be called for each replay object that must be prepared.
Public method | PrepareForPlayback | Prepares the specified replay object for playback. The implementing type should ensure that all game systems likley to affect the replay object during playback are suitable disabled in order to avoid glitching or unpredicted behaviour. This method will be called for each replay object that must be prepared.
Top
See Also

Reference

UltimateReplay.Core Namespace


IReplayPreparer Methods

IReplayPreparer Methods

The IReplayPreparer type exposes the following members.

Methods
 | Name | Description
Public method | PrepareForGameplay | Prepares the specified replay object for gameplay. The implementing type should restore all game systems that affect the replay object so that the object is in its original state. This method will be called for each replay object that must be prepared.
Public method | PrepareForPlayback | Prepares the specified replay object for playback. The implementing type should ensure that all game systems likley to affect the replay object during playback are suitable disabled in order to avoid glitching or unpredicted behaviour. This method will be called for each replay object that must be prepared.
Top
See Also

Reference

IReplayPreparer Interface
UltimateReplay.Core Namespace


IReplayPreparer.PrepareForGameplay Method

IReplayPreparerPrepareForGameplay Method
Prepares the specified replay object for gameplay. The implementing type should restore all game systems that affect the replay object so that the object is in its original state. This method will be called for each replay object that must be prepared.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
void PrepareForGameplay(
    ReplayObject replayObject
)

Parameters

replayObject
Type: UltimateReplayReplayObject
The replay object to prepare
See Also

Reference

IReplayPreparer Interface
UltimateReplay.Core Namespace


IReplayPreparer.PrepareForPlayback Method

IReplayPreparerPrepareForPlayback Method
Prepares the specified replay object for playback. The implementing type should ensure that all game systems likley to affect the replay object during playback are suitable disabled in order to avoid glitching or unpredicted behaviour. This method will be called for each replay object that must be prepared.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
void PrepareForPlayback(
    ReplayObject replayObject
)

Parameters

replayObject
Type: UltimateReplayReplayObject
The replay object that should be prepared
See Also

Reference

IReplayPreparer Interface
UltimateReplay.Core Namespace


IReplaySerialize Interface

IReplaySerialize Interface
This class should be implemented when you want to serialize custom replay data. This sould really be an interface but it needs to be a class to be assignable in the inspector.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public interface IReplaySerialize

The IReplaySerialize type exposes the following members.

Methods
 | Name | Description
Public method | OnReplayDeserialize | Called by the replay system when all replay state data should be deserialized.
Public method | OnReplaySerialize | Called by the replay system when all replay state data should be serialized.
Top
See Also

Reference

UltimateReplay.Core Namespace


IReplaySerialize Methods

IReplaySerialize Methods

The IReplaySerialize type exposes the following members.

Methods
 | Name | Description
Public method | OnReplayDeserialize | Called by the replay system when all replay state data should be deserialized.
Public method | OnReplaySerialize | Called by the replay system when all replay state data should be serialized.
Top
See Also

Reference

IReplaySerialize Interface
UltimateReplay.Core Namespace


IReplaySerialize.OnReplayDeserialize Method

IReplaySerializeOnReplayDeserialize Method
Called by the replay system when all replay state data should be deserialized.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
void OnReplayDeserialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to read the data from
See Also

Reference

IReplaySerialize Interface
UltimateReplay.Core Namespace


IReplaySerialize.OnReplaySerialize Method

IReplaySerializeOnReplaySerialize Method
Called by the replay system when all replay state data should be serialized.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
void OnReplaySerialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to write the data to
See Also

Reference

IReplaySerialize Interface
UltimateReplay.Core Namespace


ReplayEvent Structure

ReplayEvent Structure
Used to mark key recording events that will be triggered during playback. Good candidates would be to trigger audio effects or similar.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public struct ReplayEvent : IReplaySerialize

The ReplayEvent type exposes the following members.

Methods
 | Name | Description
Public method | OnReplayDeserialize | Called by the replay system when all replay state information should be deserialized.
Public method | OnReplaySerialize | Called by the replay system when all replay state information should be serialized.
Top
Fields
 | Name | Description
Public field | eventData | The replay state data associated with this ReplayEvent. The event data should contain no more than 255 bytes to ensure that the data is serialized correctly.
Public field | eventID | A unique event identifier used to distinguish between different replay events.
Top
See Also

Reference

UltimateReplay.Core Namespace


ReplayEvent Fields

ReplayEvent Fields

The ReplayEvent type exposes the following members.

Fields
 | Name | Description
Public field | eventData | The replay state data associated with this ReplayEvent. The event data should contain no more than 255 bytes to ensure that the data is serialized correctly.
Public field | eventID | A unique event identifier used to distinguish between different replay events.
Top
See Also

Reference

ReplayEvent Structure
UltimateReplay.Core Namespace


ReplayEvent.eventData Field

ReplayEventeventData Field
The replay state data associated with this ReplayEvent. The event data should contain no more than 255 bytes to ensure that the data is serialized correctly.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayState eventData

Field Value

Type: ReplayState
See Also

Reference

ReplayEvent Structure
UltimateReplay.Core Namespace


ReplayEvent.eventID Field

ReplayEventeventID Field
A unique event identifier used to distinguish between different replay events.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public byte eventID

Field Value

Type: Byte
See Also

Reference

ReplayEvent Structure
UltimateReplay.Core Namespace


ReplayEvent Methods

ReplayEvent Methods

The ReplayEvent type exposes the following members.

Methods
 | Name | Description
Public method | OnReplayDeserialize | Called by the replay system when all replay state information should be deserialized.
Public method | OnReplaySerialize | Called by the replay system when all replay state information should be serialized.
Top
See Also

Reference

ReplayEvent Structure
UltimateReplay.Core Namespace


ReplayEvent.OnReplayDeserialize Method

ReplayEventOnReplayDeserialize Method
Called by the replay system when all replay state information should be deserialized.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplayDeserialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to read the data from

Implements

IReplaySerializeOnReplayDeserialize(ReplayState)
See Also

Reference

ReplayEvent Structure
UltimateReplay.Core Namespace


ReplayEvent.OnReplaySerialize Method

ReplayEventOnReplaySerialize Method
Called by the replay system when all replay state information should be serialized.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplaySerialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to write the data to

Implements

IReplaySerializeOnReplaySerialize(ReplayState)
See Also

Reference

ReplayEvent Structure
UltimateReplay.Core Namespace


ReplayEvents Enumeration

ReplayEvents Enumeration
Common events identifiers used to record ReplayEvent with the replay system.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum ReplayEvents
Members
Member name | Value | Description
ObjectSpawn | 1 | Object instantiated event.
ObjectDespawn | 2 | Object destroyed event.
PlaySound | 3 | Play audio clip event.
PlayMusic | 4 | Play audio music event.
ParticleStart | 5 | Start particle system event.
ParticleEnd | 6 | Stop particle system event.
See Also

Reference

UltimateReplay.Core Namespace


ReplayIdentity Class

ReplayIdentity Class
A replay identity is an essential component in the Ultimate Replay system and is used to identify replay objects between sessions. Replay identities are assigned at edit time where possible and will never change values. Replay identities are also use to identify prefab instances that are spawned during a replay.
Inheritance Hierarchy
SystemObject
UltimateReplay.CoreReplayIdentity

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
[SerializableAttribute]
public sealed class ReplayIdentity : IEquatable<ReplayIdentity>

The ReplayIdentity type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayIdentity | Create a new ReplayIdentity.
Top
Methods
 | Name | Description
Public method | Equals(Object) | Override implementation. (Overrides ObjectEquals(Object).)
Public method | Equals(ReplayIdentity) | IEquateable implementation.
Public method | Generate | Generates a unique ReplayIdentity.
Public method | GetHashCode | Override implementation. (Overrides ObjectGetHashCode.)
 | IsUnique(Int32) | Returns true if the specified id is unique or false if not.
 | IsUnique(ReplayIdentity) | Returns true if the specified ReplayIdentity is unique or false if not.
Public method | ToString | Override implementation. (Overrides ObjectToString.)
Top
Operators
Name | Description
Equality | Override equals operator.
(Int16 to ReplayIdentity) | Implicit short conversion (16 bit identity only).
(ReplayIdentity to Int16) | Implicit int conversion (32 bit identity only).
Inequality | Override not-equals operator.
Top
Fields
Name | Description
byteSize | Get the size in bytes of a ReplayIdentity representation.
unassignedIdentity | Get the default value for a ReplayIdentity id which equates to an unassigned identity.
Top
Properties
 | Name | Description
Public property | IsAssigned | Returns true if the identity has been generated or false if it has not.
Top
See Also

Reference

UltimateReplay.Core Namespace


ReplayIdentity Constructor

ReplayIdentity Constructor
Create a new ReplayIdentity.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayIdentity()
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity Fields

ReplayIdentity Fields

The ReplayIdentity type exposes the following members.

Fields
Name | Description
byteSize | Get the size in bytes of a ReplayIdentity representation.
unassignedIdentity | Get the default value for a ReplayIdentity id which equates to an unassigned identity.
Top
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity.byteSize Field

ReplayIdentitybyteSize Field
Get the size in bytes of a ReplayIdentity representation.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static readonly int byteSize

Field Value

Type: Int32
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity.unassignedIdentity Field

ReplayIdentityunassignedIdentity Field
Get the default value for a ReplayIdentity id which equates to an unassigned identity.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public const int unassignedIdentity

Field Value

Type: Int32
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity Methods

ReplayIdentity Methods

The ReplayIdentity type exposes the following members.

Methods
 | Name | Description
Public method | Equals(Object) | Override implementation. (Overrides ObjectEquals(Object).)
Public method | Equals(ReplayIdentity) | IEquateable implementation.
Public method | Generate | Generates a unique ReplayIdentity.
Public method | GetHashCode | Override implementation. (Overrides ObjectGetHashCode.)
 | IsUnique(Int32) | Returns true if the specified id is unique or false if not.
 | IsUnique(ReplayIdentity) | Returns true if the specified ReplayIdentity is unique or false if not.
Public method | ToString | Override implementation. (Overrides ObjectToString.)
Top
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity.Equals Method

ReplayIdentityEquals Method
Overload List
 | Name | Description
Public method | Equals(Object) | Override implementation. (Overrides ObjectEquals(Object).)
Public method | Equals(ReplayIdentity) | IEquateable implementation.
Top
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity.Equals Method (Object)

ReplayIdentityEquals Method (Object)
Override implementation.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override bool Equals(
    Object obj
)

Parameters

obj
Type: SystemObject
The object to compare against

Return Value

Type: Boolean

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.Equals(System.Object)"]

See Also

Reference

ReplayIdentity Class
Equals Overload
UltimateReplay.Core Namespace


ReplayIdentity.Equals Method (ReplayIdentity)

ReplayIdentityEquals Method (ReplayIdentity)
IEquateable implementation.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool Equals(
    ReplayIdentity obj
)

Parameters

obj
Type: UltimateReplay.CoreReplayIdentity
The ReplayIdentity to compare against

Return Value

Type: Boolean

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.Equals(UltimateReplay.Core.ReplayIdentity)"]

Implements

IEquatableTEquals(T)
See Also

Reference

ReplayIdentity Class
Equals Overload
UltimateReplay.Core Namespace


ReplayIdentity.Generate Method

ReplayIdentityGenerate Method
Generates a unique ReplayIdentity.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Generate()
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity.GetHashCode Method

ReplayIdentityGetHashCode Method
Override implementation.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override int GetHashCode()

Return Value

Type: Int32

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.GetHashCode"]

See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity.IsUnique Method

ReplayIdentityIsUnique Method
Overload List
Name | Description
IsUnique(Int32) | Returns true if the specified id is unique or false if not.
IsUnique(ReplayIdentity) | Returns true if the specified ReplayIdentity is unique or false if not.
Top
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity.IsUnique Method (Int32)

ReplayIdentityIsUnique Method (Int32)
Returns true if the specified id is unique or false if not.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool IsUnique(
    int id
)

Parameters

id
Type: SystemInt32
The int id to check

Return Value

Type: Boolean

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.IsUnique(System.Int32)"]

See Also

Reference

ReplayIdentity Class
IsUnique Overload
UltimateReplay.Core Namespace


ReplayIdentity.IsUnique Method (ReplayIdentity)

ReplayIdentityIsUnique Method (ReplayIdentity)
Returns true if the specified ReplayIdentity is unique or false if not.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool IsUnique(
    ReplayIdentity id
)

Parameters

id
Type: UltimateReplay.CoreReplayIdentity
The identity to check

Return Value

Type: Boolean

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.IsUnique(UltimateReplay.Core.ReplayIdentity)"]

See Also

Reference

ReplayIdentity Class
IsUnique Overload
UltimateReplay.Core Namespace


ReplayIdentity.ToString Method

ReplayIdentityToString Method
Override implementation.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override string ToString()

Return Value

Type: String

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.ToString"]

See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity Operators and Type Conversions

ReplayIdentity Operators and Type Conversions

The ReplayIdentity type exposes the following members.

Operators
Name | Description
Equality | Override equals operator.
(Int16 to ReplayIdentity) | Implicit short conversion (16 bit identity only).
(ReplayIdentity to Int16) | Implicit int conversion (32 bit identity only).
Inequality | Override not-equals operator.
Top
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity.Equality Operator

ReplayIdentityEquality Operator
Override equals operator.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool operator ==(
    ReplayIdentity a,
    ReplayIdentity b
)

Parameters

a
Type: UltimateReplay.CoreReplayIdentity
First ReplayIdentity
b
Type: UltimateReplay.CoreReplayIdentity
Second ReplayIdentity

Return Value

Type: Boolean

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.op_Equality(UltimateReplay.Core.ReplayIdentity,UltimateReplay.Core.ReplayIdentity)"]

See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity Implicit Conversion Operators

ReplayIdentity Conversion Operators
Overload List
Name | Description
(Int16 to ReplayIdentity) | Implicit short conversion (16 bit identity only).
(ReplayIdentity to Int16) | Implicit int conversion (32 bit identity only).
Top
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity Implicit Conversion (Int16 to ReplayIdentity)

ReplayIdentity Conversion (Int16 to ReplayIdentity)
Implicit short conversion (16 bit identity only).

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static implicit operator ReplayIdentity (
    short identity
)

Parameters

identity
Type: SystemInt16
The identity to convert

Return Value

Type: ReplayIdentity

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.op_Implicit(System.Int16)~UltimateReplay.Core.ReplayIdentity"]

See Also

Reference

ReplayIdentity Class
Overload
UltimateReplay.Core Namespace


ReplayIdentity Implicit Conversion (ReplayIdentity to Int16)

ReplayIdentity Conversion (ReplayIdentity to Int16)
Implicit int conversion (32 bit identity only).

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static implicit operator short (
    ReplayIdentity identity
)

Parameters

identity
Type: UltimateReplay.CoreReplayIdentity
The identify to convert

Return Value

Type: Int16

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.op_Implicit(UltimateReplay.Core.ReplayIdentity)~System.Int16"]

See Also

Reference

ReplayIdentity Class
Overload
UltimateReplay.Core Namespace


ReplayIdentity.Inequality Operator

ReplayIdentityInequality Operator
Override not-equals operator.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool operator !=(
    ReplayIdentity a,
    ReplayIdentity b
)

Parameters

a
Type: UltimateReplay.CoreReplayIdentity
First ReplayIdentity
b
Type: UltimateReplay.CoreReplayIdentity
Second ReplayIdentity

Return Value

Type: Boolean

[Missing <returns> documentation for "M:UltimateReplay.Core.ReplayIdentity.op_Inequality(UltimateReplay.Core.ReplayIdentity,UltimateReplay.Core.ReplayIdentity)"]

See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity Properties

ReplayIdentity Properties

The ReplayIdentity type exposes the following members.

Properties
 | Name | Description
Public property | IsAssigned | Returns true if the identity has been generated or false if it has not.
Top
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayIdentity.IsAssigned Property

ReplayIdentityIsAssigned Property
Returns true if the identity has been generated or false if it has not.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsAssigned { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayIdentity Class
UltimateReplay.Core Namespace


ReplayScene Class

ReplayScene Class
A ReplayScene contains information about all active replay objects.
Inheritance Hierarchy
SystemObject
UltimateReplay.CoreReplayScene

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

The ReplayScene type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayScene | Initializes a new instance of the ReplayScene class
Top
Methods
 | Name | Description
Public method | RecordSnapshot | Take a snapshot of the current replay scene using the specified timestamp.
Public method | RegisterReplayObject | Registers a replay object with the replay system so that it can be recorded for playback. Typically all ReplayObject will auto register when they 'Awake' meaning that you will not need to manually register objects.
Public method | RestoreSnapshot | Restore the scene to the state described by the specified snapshot.
Public method | UnregisterReplayObject | Unregisters a replay object from the replay system so that it will no longer be recorded for playback. Typically all ReplayObject will auto un-register when they are destroyed so you will normally not need to un-register a replay object.
Top
Properties
 | Name | Description
Public property | ActiveReplayObjects | Get a collection of all game objects that are registered with the replay system.
Public property | ReplayEnabled | Enable or disable the replay scene in preparation for playback or live mode. When true, all replay objects will be prepared for playback causing certain components or scripts to be disabled to prevent interference from game systems. A prime candidate would be the RigidBody component which could cause a replay object to be affected by gravity and as a result deviate from its intended position. When false, all replay objects will be returned to their 'Live' state when all game systems will be reactivated.
Top
See Also

Reference

UltimateReplay.Core Namespace


ReplayScene Constructor

ReplayScene Constructor
Initializes a new instance of the ReplayScene class

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayScene()
See Also

Reference

ReplayScene Class
UltimateReplay.Core Namespace


ReplayScene Methods

ReplayScene Methods

The ReplayScene type exposes the following members.

Methods
 | Name | Description
Public method | RecordSnapshot | Take a snapshot of the current replay scene using the specified timestamp.
Public method | RegisterReplayObject | Registers a replay object with the replay system so that it can be recorded for playback. Typically all ReplayObject will auto register when they 'Awake' meaning that you will not need to manually register objects.
Public method | RestoreSnapshot | Restore the scene to the state described by the specified snapshot.
Public method | UnregisterReplayObject | Unregisters a replay object from the replay system so that it will no longer be recorded for playback. Typically all ReplayObject will auto un-register when they are destroyed so you will normally not need to un-register a replay object.
Top
See Also

Reference

ReplayScene Class
UltimateReplay.Core Namespace


ReplayScene.RecordSnapshot Method

ReplaySceneRecordSnapshot Method
Take a snapshot of the current replay scene using the specified timestamp.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplaySnapshot RecordSnapshot(
    float timeStamp
)

Parameters

timeStamp
Type: SystemSingle
The timestamp for the frame indicating its position in the playback sequence

Return Value

Type: ReplaySnapshot
A new snapshot of the current replay scene
See Also

Reference

ReplayScene Class
UltimateReplay.Core Namespace


ReplayScene.RegisterReplayObject Method

ReplaySceneRegisterReplayObject Method
Registers a replay object with the replay system so that it can be recorded for playback. Typically all ReplayObject will auto register when they 'Awake' meaning that you will not need to manually register objects.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RegisterReplayObject(
    ReplayObject replayObject
)

Parameters

replayObject
Type: UltimateReplayReplayObject
The ReplayObject to register
See Also

Reference

ReplayScene Class
UltimateReplay.Core Namespace


ReplayScene.RestoreSnapshot Method

ReplaySceneRestoreSnapshot Method
Restore the scene to the state described by the specified snapshot.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RestoreSnapshot(
    ReplaySnapshot snapshot
)

Parameters

snapshot
Type: UltimateReplay.StorageReplaySnapshot
The snapshot to restore
See Also

Reference

ReplayScene Class
UltimateReplay.Core Namespace


ReplayScene.UnregisterReplayObject Method

ReplaySceneUnregisterReplayObject Method
Unregisters a replay object from the replay system so that it will no longer be recorded for playback. Typically all ReplayObject will auto un-register when they are destroyed so you will normally not need to un-register a replay object.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void UnregisterReplayObject(
    ReplayObject replayObject
)

Parameters

replayObject
Type: UltimateReplayReplayObject
See Also

Reference

ReplayScene Class
UltimateReplay.Core Namespace


ReplayScene Properties

ReplayScene Properties

The ReplayScene type exposes the following members.

Properties
 | Name | Description
Public property | ActiveReplayObjects | Get a collection of all game objects that are registered with the replay system.
Public property | ReplayEnabled | Enable or disable the replay scene in preparation for playback or live mode. When true, all replay objects will be prepared for playback causing certain components or scripts to be disabled to prevent interference from game systems. A prime candidate would be the RigidBody component which could cause a replay object to be affected by gravity and as a result deviate from its intended position. When false, all replay objects will be returned to their 'Live' state when all game systems will be reactivated.
Top
See Also

Reference

ReplayScene Class
UltimateReplay.Core Namespace


ReplayScene.ActiveReplayObjects Property

ReplaySceneActiveReplayObjects Property
Get a collection of all game objects that are registered with the replay system.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public HashSet<ReplayObject> ActiveReplayObjects { get; }

Property Value

Type: HashSet ReplayObject
See Also

Reference

ReplayScene Class
UltimateReplay.Core Namespace


ReplayScene.ReplayEnabled Property

ReplaySceneReplayEnabled Property
Enable or disable the replay scene in preparation for playback or live mode. When true, all replay objects will be prepared for playback causing certain components or scripts to be disabled to prevent interference from game systems. A prime candidate would be the RigidBody component which could cause a replay object to be affected by gravity and as a result deviate from its intended position. When false, all replay objects will be returned to their 'Live' state when all game systems will be reactivated.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool ReplayEnabled { get; set; }

Property Value

Type: Boolean
See Also

Reference

ReplayScene Class
UltimateReplay.Core Namespace


ReplayVariable Class

ReplayVariable Class
Represents a variable that can be recorded using the replay system in order to replay script animations or similar during playback.
Inheritance Hierarchy
SystemObject
UltimateReplay.CoreReplayVariable

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public sealed class ReplayVariable : IReplaySerialize

The ReplayVariable type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayVariable | Create a new ReplayVariable.
Top
Methods
 | Name | Description
 | CanInterpolate | Returns true if the specified type can be interpolated by the replay system.
Public method | Interpolate | Attempts to interpolate the ReplayVariable value using the values from the last and next frame.
 | InterpolateByte | Default interpolator for byte.
 | InterpolateColor | Default interpolator for Color.
 | InterpolateColor32 | Default interpolator for Color32.
 | InterpolateDouble | Default interpolator for double.
 | InterpolateFloat | Default interpolator for float.
 | InterpolateInt | Default interpolator for int.
 | InterpolateLong | Default interpolator for long.
 | InterpolateQuat | Default interpolator for Quaternion.
 | InterpolateShort | Default interpolator for short.
 | InterpolateValue | Attempts to interpolate the ReplayVariable value using the values from the last and next frame. In order for interpolation to succeed, the last and next values must be of the same type.
 | InterpolateVec2 | Default interpolator for Vector2.
 | InterpolateVec3 | Default interpolator for Vector3.
 | InterpolateVec4 | Default interpolator for Vector4.
Public method | OnReplayDeserialize | Called by the replay system when the variable should be deserialized.
Public method | OnReplaySerialize | Called by the replay system when the variable should be serialized.
 | RegisterCustomInterpolatorT | Allows a custom interpolation method to be registered so that unsupported variable types can be interpolated automatically.
Public method | UpdateValueRange | Sets the current interpolation range for the ReplayVariable value.
Top
Properties
 | Name | Description
Public property | Attribute | Get the ReplayVarAttribute associated with this ReplayVariable.
Public property | gameObject | Get the game object that this ReplayVariable is attached to.
Public property | IsInterpolated | Returns true if this ReplayVariable should be interpolated between frames.
Public property | IsInterpolationSupported | Returns true if this ReplayVariable supports interpolation. Interpolation can only be supported if the variable type has a registered interpolator.
Public property | Name | Get the name of this ReplayVariable.
Public property | Value | The current value for this ReplayVariable.
Top
See Also

Reference

UltimateReplay.Core Namespace


ReplayVariable Constructor

ReplayVariable Constructor
Create a new ReplayVariable.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayVariable(
    ReplayBehaviour owner,
    FieldInfo field,
    ReplayVarAttribute attribute
)

Parameters

owner
Type: UltimateReplayReplayBehaviour
The ReplayBehaviour that this ReplayVariable is defined in
field
Type: System.ReflectionFieldInfo
The field info for the variable field
attribute
Type: UltimateReplayReplayVarAttribute
The ReplayVarAttribute for the field
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable Methods

ReplayVariable Methods

The ReplayVariable type exposes the following members.

Methods
 | Name | Description
 | CanInterpolate | Returns true if the specified type can be interpolated by the replay system.
Public method | Interpolate | Attempts to interpolate the ReplayVariable value using the values from the last and next frame.
 | InterpolateByte | Default interpolator for byte.
 | InterpolateColor | Default interpolator for Color.
 | InterpolateColor32 | Default interpolator for Color32.
 | InterpolateDouble | Default interpolator for double.
 | InterpolateFloat | Default interpolator for float.
 | InterpolateInt | Default interpolator for int.
 | InterpolateLong | Default interpolator for long.
 | InterpolateQuat | Default interpolator for Quaternion.
 | InterpolateShort | Default interpolator for short.
 | InterpolateValue | Attempts to interpolate the ReplayVariable value using the values from the last and next frame. In order for interpolation to succeed, the last and next values must be of the same type.
 | InterpolateVec2 | Default interpolator for Vector2.
 | InterpolateVec3 | Default interpolator for Vector3.
 | InterpolateVec4 | Default interpolator for Vector4.
Public method | OnReplayDeserialize | Called by the replay system when the variable should be deserialized.
Public method | OnReplaySerialize | Called by the replay system when the variable should be serialized.
 | RegisterCustomInterpolatorT | Allows a custom interpolation method to be registered so that unsupported variable types can be interpolated automatically.
Public method | UpdateValueRange | Sets the current interpolation range for the ReplayVariable value.
Top
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.CanInterpolate Method

ReplayVariableCanInterpolate Method
Returns true if the specified type can be interpolated by the replay system.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool CanInterpolate(
    Type type
)

Parameters

type
Type: SystemType
The system type to check for interpolation support

Return Value

Type: Boolean
True if interpolation is supported or faluse if it is not
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.Interpolate Method

ReplayVariableInterpolate Method
Attempts to interpolate the ReplayVariable value using the values from the last and next frame.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Interpolate(
    float delta
)

Parameters

delta
Type: SystemSingle
The normalized delta representing the progression from the last frame to the next frame
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateByte Method

ReplayVariableInterpolateByte Method
Default interpolator for byte.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateByte(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated byte value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateColor Method

ReplayVariableInterpolateColor Method
Default interpolator for Color.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateColor(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated Color value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateColor32 Method

ReplayVariableInterpolateColor32 Method
Default interpolator for Color32.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateColor32(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated Color32 value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateDouble Method

ReplayVariableInterpolateDouble Method
Default interpolator for double.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateDouble(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated double value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateFloat Method

ReplayVariableInterpolateFloat Method
Default interpolator for float.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateFloat(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated float value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateInt Method

ReplayVariableInterpolateInt Method
Default interpolator for int.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateInt(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated int value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateLong Method

ReplayVariableInterpolateLong Method
Default interpolator for long.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateLong(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated long value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateQuat Method

ReplayVariableInterpolateQuat Method
Default interpolator for Quaternion.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateQuat(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated Quaternion value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateShort Method

ReplayVariableInterpolateShort Method
Default interpolator for short.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateShort(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated short value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateValue Method

ReplayVariableInterpolateValue Method
Attempts to interpolate the ReplayVariable value using the values from the last and next frame. In order for interpolation to succeed, the last and next values must be of the same type.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateValue(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
The value of the variable in the last frame
next
Type: SystemObject
The value of the variable in the next frame
delta
Type: SystemSingle
The normalized delta representing the progression from the last frame to the next frame

Return Value

Type: Object
The interpolated value result or null if interpolation is not supported for the type
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateVec2 Method

ReplayVariableInterpolateVec2 Method
Default interpolator for Vector2.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateVec2(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated Vector2 value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateVec3 Method

ReplayVariableInterpolateVec3 Method
Default interpolator for Vector3.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateVec3(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated Vector3 value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.InterpolateVec4 Method

ReplayVariableInterpolateVec4 Method
Default interpolator for Vector4.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static Object InterpolateVec4(
    Object last,
    Object next,
    float delta
)

Parameters

last
Type: SystemObject
Last value
next
Type: SystemObject
Next value
delta
Type: SystemSingle
Interpolation delta

Return Value

Type: Object
The interpolated Vector4 value
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.OnReplayDeserialize Method

ReplayVariableOnReplayDeserialize Method
Called by the replay system when the variable should be deserialized.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplayDeserialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to deserialize the data from

Implements

IReplaySerializeOnReplayDeserialize(ReplayState)
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.OnReplaySerialize Method

ReplayVariableOnReplaySerialize Method
Called by the replay system when the variable should be serialized.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplaySerialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to serialize the data into

Implements

IReplaySerializeOnReplaySerialize(ReplayState)
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.RegisterCustomInterpolator(T) Method

ReplayVariableRegisterCustomInterpolatorT Method
Allows a custom interpolation method to be registered so that unsupported variable types can be interpolated automatically.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void RegisterCustomInterpolator<T>(
    Func<Object, Object, float, Object> interpolatorFunc
)

Parameters

interpolatorFunc
Type: SystemFunc Object, Object, Single, Object
The interpolation method to invoke when interpolation of the custom type is required

Type Parameters

T
The type of varaible that the custom interpolation should be used for
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.UpdateValueRange Method

ReplayVariableUpdateValueRange Method
Sets the current interpolation range for the ReplayVariable value.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void UpdateValueRange(
    Object last,
    Object next
)

Parameters

last
Type: SystemObject
The value of the variable in the last frame
next
Type: SystemObject
The value of the variable in the next frame
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable Properties

ReplayVariable Properties

The ReplayVariable type exposes the following members.

Properties
 | Name | Description
Public property | Attribute | Get the ReplayVarAttribute associated with this ReplayVariable.
Public property | gameObject | Get the game object that this ReplayVariable is attached to.
Public property | IsInterpolated | Returns true if this ReplayVariable should be interpolated between frames.
Public property | IsInterpolationSupported | Returns true if this ReplayVariable supports interpolation. Interpolation can only be supported if the variable type has a registered interpolator.
Public property | Name | Get the name of this ReplayVariable.
Public property | Value | The current value for this ReplayVariable.
Top
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.Attribute Property

ReplayVariableAttribute Property
Get the ReplayVarAttribute associated with this ReplayVariable.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayVarAttribute Attribute { get; }

Property Value

Type: ReplayVarAttribute
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.gameObject Property

ReplayVariablegameObject Property
Get the game object that this ReplayVariable is attached to.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public GameObject gameObject { get; }

Property Value

Type: GameObject
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.IsInterpolated Property

ReplayVariableIsInterpolated Property
Returns true if this ReplayVariable should be interpolated between frames.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsInterpolated { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.IsInterpolationSupported Property

ReplayVariableIsInterpolationSupported Property
Returns true if this ReplayVariable supports interpolation. Interpolation can only be supported if the variable type has a registered interpolator.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public bool IsInterpolationSupported { get; }

Property Value

Type: Boolean
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.Name Property

ReplayVariableName Property
Get the name of this ReplayVariable.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public string Name { get; }

Property Value

Type: String
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


ReplayVariable.Value Property

ReplayVariableValue Property
The current value for this ReplayVariable.

Namespace: UltimateReplay.Core
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public Object Value { get; set; }

Property Value

Type: Object
See Also

Reference

ReplayVariable Class
UltimateReplay.Core Namespace


UltimateReplay.Storage Namespace

UltimateReplay.Storage Namespace
Classes
 | Class | Description
Public class | Compression | Compression utility using the GZip compression algorithm.
Public class | ReplayMemoryTarget | Represents a memory storage buffer where replay data can be stored for game sessions. The buffer can be used as a continuous rolling buffer of a fixed size where a fixed amount of playback footage is recorded and then overwritten by new data as it is received.
Public class | ReplaySnapshot | A frame state is a snapshot of a replay frame that is indexed based on its time stamp. By sequencing multiple frame states you can create the replay effect.
Public class | ReplayTarget | Represents and abstract storage device capable of holding recorded state data for playback at a later date. Depending upon implementation, a ReplayTarget may be volatile or non-volatile.
Enumerations
 | Enumeration | Description
Public enumeration | CompressionLevel | The amount of compression to apply to a data stream.
Public enumeration | ReplayTargetTask | Represents a task that can be issued to a ReplayTarget.


Compression Class

Compression Class
Compression utility using the GZip compression algorithm.
Inheritance Hierarchy
SystemObject
UltimateReplay.StorageCompression

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static class Compression

The Compression type exposes the following members.

Methods
Name | Description
CompressData | Compress a data stream using the GZip compression algorithm.
DecompressData | Decompress a data stream using the GZip compression algorithm.
Top
See Also

Reference

UltimateReplay.Storage Namespace


Compression Methods

Compression Methods

The Compression type exposes the following members.

Methods
Name | Description
CompressData | Compress a data stream using the GZip compression algorithm.
DecompressData | Decompress a data stream using the GZip compression algorithm.
Top
See Also

Reference

Compression Class
UltimateReplay.Storage Namespace


Compression.CompressData Method

CompressionCompressData Method
Compress a data stream using the GZip compression algorithm.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static byte[] CompressData(
    byte[] data,
    CompressionLevel level = CompressionLevel.Optimal
)

Parameters

data
Type: SystemByte
The input data to compress
level (Optional)
Type: UltimateReplay.StorageCompressionLevel
The target compression level to use

Return Value

Type: Byte
The compressed data
See Also

Reference

Compression Class
UltimateReplay.Storage Namespace


Compression.DecompressData Method

CompressionDecompressData Method
Decompress a data stream using the GZip compression algorithm.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static byte[] DecompressData(
    byte[] data,
    CompressionLevel level = CompressionLevel.Optimal
)

Parameters

data
Type: SystemByte
The input data to decompress
level (Optional)
Type: UltimateReplay.StorageCompressionLevel
The target compression level to use

Return Value

Type: Byte
The decompressed data
See Also

Reference

Compression Class
UltimateReplay.Storage Namespace


CompressionLevel Enumeration

CompressionLevel Enumeration
The amount of compression to apply to a data stream.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum CompressionLevel
Members
Member name | Value | Description
None | 0 | No compression is applied and all data is left unchanged.
Optimal | 1 | All data is compressed to the optimal level.
See Also

Reference

UltimateReplay.Storage Namespace


ReplayMemoryTarget Class

ReplayMemoryTarget Class
Represents a memory storage buffer where replay data can be stored for game sessions. The buffer can be used as a continuous rolling buffer of a fixed size where a fixed amount of playback footage is recorded and then overwritten by new data as it is received.
Inheritance Hierarchy
SystemObject
Object
Component
Behaviour
MonoBehaviour
UltimateReplayReplayBehaviour
UltimateReplay.StorageReplayTarget
UltimateReplay.StorageReplayMemoryTarget

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
[SerializableAttribute]
public class ReplayMemoryTarget : ReplayTarget

The ReplayMemoryTarget type exposes the following members.

Constructors
 | Name | Description
Public method | ReplayMemoryTarget | Initializes a new instance of the ReplayMemoryTarget class
Top
Methods
 | Name | Description
Public method | PrepareTarget | Clears all state information for the current recording essentially restoring the memory target to its initial state. (Overrides ReplayTargetPrepareTarget(ReplayTargetTask).)
Public method | RecordSnapshot | Store a replay snapshot in the replay target. If the new snapshot causes the internal buffer to 'overflow' then the recoding clip will be wrapped so that the recording duration is no more than recordSeconds. (Overrides ReplayTargetRecordSnapshot(ReplaySnapshot).)
Public method | RestoreSnapshot | Recall a snapshot from the replay target based on the specified replay offset. (Overrides ReplayTargetRestoreSnapshot(Single).)
Top
Fields
 | Name | Description
Public field | recordSeconds | The amount of time in seconds of recording that should be kept in memory before it is discarded. The time is measured backwards from the current time to give a rolling buffer of the last 'n' seconds. This is useful in situations where you are only need the previous few secnonds of gameplay to be recorded for example: A kill cam. If this value is set to 0 then the internal buffer will not be wrapped at all. You should take extra care when using an unconstrained buffer as there is potential to run into an OutOfMemoryException, especially on mobile platforms where memory is at a premium.
Top
Properties
 | Name | Description
Public property | Duration | The amount of time in seconds that the recording lasts. Usually this value will be equal to recordSeconds however it will take atleast the amount of recordSeconds to initially fill the buffer before it wraps around. (Overrides ReplayTargetDuration.)
Public property | MemorySize | Get the amount of size in bytes that this memory target requires for all state data. This size does not include internal structures used to store the data but exclusivley contains game state sizes. (Overrides ReplayTargetMemorySize.)
Top
See Also

Reference

UltimateReplay.Storage Namespace


ReplayMemoryTarget Constructor

ReplayMemoryTarget Constructor
Initializes a new instance of the ReplayMemoryTarget class

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayMemoryTarget()
See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplayMemoryTarget Fields

ReplayMemoryTarget Fields

The ReplayMemoryTarget type exposes the following members.

Fields
 | Name | Description
Public field | recordSeconds | The amount of time in seconds of recording that should be kept in memory before it is discarded. The time is measured backwards from the current time to give a rolling buffer of the last 'n' seconds. This is useful in situations where you are only need the previous few secnonds of gameplay to be recorded for example: A kill cam. If this value is set to 0 then the internal buffer will not be wrapped at all. You should take extra care when using an unconstrained buffer as there is potential to run into an OutOfMemoryException, especially on mobile platforms where memory is at a premium.
Top
See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplayMemoryTarget.recordSeconds Field

ReplayMemoryTargetrecordSeconds Field
The amount of time in seconds of recording that should be kept in memory before it is discarded. The time is measured backwards from the current time to give a rolling buffer of the last 'n' seconds. This is useful in situations where you are only need the previous few secnonds of gameplay to be recorded for example: A kill cam. If this value is set to 0 then the internal buffer will not be wrapped at all. You should take extra care when using an unconstrained buffer as there is potential to run into an OutOfMemoryException, especially on mobile platforms where memory is at a premium.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float recordSeconds

Field Value

Type: Single
See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplayMemoryTarget Methods

ReplayMemoryTarget Methods

The ReplayMemoryTarget type exposes the following members.

Methods
 | Name | Description
Public method | PrepareTarget | Clears all state information for the current recording essentially restoring the memory target to its initial state. (Overrides ReplayTargetPrepareTarget(ReplayTargetTask).)
Public method | RecordSnapshot | Store a replay snapshot in the replay target. If the new snapshot causes the internal buffer to 'overflow' then the recoding clip will be wrapped so that the recording duration is no more than recordSeconds. (Overrides ReplayTargetRecordSnapshot(ReplaySnapshot).)
Public method | RestoreSnapshot | Recall a snapshot from the replay target based on the specified replay offset. (Overrides ReplayTargetRestoreSnapshot(Single).)
Top
See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplayMemoryTarget.PrepareTarget Method

ReplayMemoryTargetPrepareTarget Method
Clears all state information for the current recording essentially restoring the memory target to its initial state.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void PrepareTarget(
    ReplayTargetTask mode
)

Parameters

mode
Type: UltimateReplay.StorageReplayTargetTask

[Missing <param name="mode"/> documentation for "M:UltimateReplay.Storage.ReplayMemoryTarget.PrepareTarget(UltimateReplay.Storage.ReplayTargetTask)"]

See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplayMemoryTarget.RecordSnapshot Method

ReplayMemoryTargetRecordSnapshot Method
Store a replay snapshot in the replay target. If the new snapshot causes the internal buffer to 'overflow' then the recoding clip will be wrapped so that the recording duration is no more than recordSeconds.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override void RecordSnapshot(
    ReplaySnapshot state
)

Parameters

state
Type: UltimateReplay.StorageReplaySnapshot
The snapshot to store
See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplayMemoryTarget.RestoreSnapshot Method

ReplayMemoryTargetRestoreSnapshot Method
Recall a snapshot from the replay target based on the specified replay offset.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override ReplaySnapshot RestoreSnapshot(
    float offset
)

Parameters

offset
Type: SystemSingle
The offset pointing to the individual snapshot to recall

Return Value

Type: ReplaySnapshot
The replay snapshot at the specified offset
See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplayMemoryTarget Properties

ReplayMemoryTarget Properties

The ReplayMemoryTarget type exposes the following members.

Properties
 | Name | Description
Public property | Duration | The amount of time in seconds that the recording lasts. Usually this value will be equal to recordSeconds however it will take atleast the amount of recordSeconds to initially fill the buffer before it wraps around. (Overrides ReplayTargetDuration.)
Public property | MemorySize | Get the amount of size in bytes that this memory target requires for all state data. This size does not include internal structures used to store the data but exclusivley contains game state sizes. (Overrides ReplayTargetMemorySize.)
Top
See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplayMemoryTarget.Duration Property

ReplayMemoryTargetDuration Property
The amount of time in seconds that the recording lasts. Usually this value will be equal to recordSeconds however it will take atleast the amount of recordSeconds to initially fill the buffer before it wraps around.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override float Duration { get; }

Property Value

Type: Single
See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplayMemoryTarget.MemorySize Property

ReplayMemoryTargetMemorySize Property
Get the amount of size in bytes that this memory target requires for all state data. This size does not include internal structures used to store the data but exclusivley contains game state sizes.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public override int MemorySize { get; }

Property Value

Type: Int32
See Also

Reference

ReplayMemoryTarget Class
UltimateReplay.Storage Namespace


ReplaySnapshot Class

ReplaySnapshot Class
A frame state is a snapshot of a replay frame that is indexed based on its time stamp. By sequencing multiple frame states you can create the replay effect.
Inheritance Hierarchy
SystemObject
UltimateReplay.StorageReplaySnapshot

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
[SerializableAttribute]
public sealed class ReplaySnapshot : IReplaySerialize,
    IReplayDataSerialize

The ReplaySnapshot type exposes the following members.

Constructors
 | Name | Description
Public method | ReplaySnapshot | Create a new snapshot with the specified time stamp.
Top
Methods
 | Name | Description
Public method | OnReplayDataDeserialize | Called by the replay system when this ReplaySnapshot should be deserialized from binary.
Public method | OnReplayDataSerialize | Called by the replay system when this ReplaySnapshot should be serialized to binary.
Public method | OnReplayDeserialize | Called by the replay system when this ReplaySnapshot should be deserialized.
Public method | OnReplaySerialize | Called by the replay system when this ReplaySnapshot should be serialized.
Public method | RecordSnapshot | Registers the specified replay state with this snapshot. The specified identity is used during playback to ensure that the replay objects receives the correct state to deserialize.
Public method | Reset | Clears all state information from the snapshot but keeps the time stamp.
Public method | RestoreReplayObjects | Attempts to restore any replay objects that were spawned or despawned during this snapshot.
Public method | RestoreSnapshot | Attempts to recall the state information for the specified replay object identity. If the identity does not exist in the scene then the return value will be null.
Top
Properties
 | Name | Description
Public property | Size | Get the size in bytes of the snapshot data.
Public property | TimeStamp | The time stamp for this snapshot. The time stamp is used to identify the snapshot location in the sequence.
Top
See Also

Reference

UltimateReplay.Storage Namespace


ReplaySnapshot Constructor

ReplaySnapshot Constructor
Create a new snapshot with the specified time stamp.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplaySnapshot(
    float timeStamp
)

Parameters

timeStamp
Type: SystemSingle
The time stamp to give to this snapshot
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot Methods

ReplaySnapshot Methods

The ReplaySnapshot type exposes the following members.

Methods
 | Name | Description
Public method | OnReplayDataDeserialize | Called by the replay system when this ReplaySnapshot should be deserialized from binary.
Public method | OnReplayDataSerialize | Called by the replay system when this ReplaySnapshot should be serialized to binary.
Public method | OnReplayDeserialize | Called by the replay system when this ReplaySnapshot should be deserialized.
Public method | OnReplaySerialize | Called by the replay system when this ReplaySnapshot should be serialized.
Public method | RecordSnapshot | Registers the specified replay state with this snapshot. The specified identity is used during playback to ensure that the replay objects receives the correct state to deserialize.
Public method | Reset | Clears all state information from the snapshot but keeps the time stamp.
Public method | RestoreReplayObjects | Attempts to restore any replay objects that were spawned or despawned during this snapshot.
Public method | RestoreSnapshot | Attempts to recall the state information for the specified replay object identity. If the identity does not exist in the scene then the return value will be null.
Top
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.OnReplayDataDeserialize Method

ReplaySnapshotOnReplayDataDeserialize Method
Called by the replay system when this ReplaySnapshot should be deserialized from binary.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplayDataDeserialize(
    BinaryReader reader
)

Parameters

reader
Type: System.IOBinaryReader
The binary stream to read the data from
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.OnReplayDataSerialize Method

ReplaySnapshotOnReplayDataSerialize Method
Called by the replay system when this ReplaySnapshot should be serialized to binary.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplayDataSerialize(
    BinaryWriter writer
)

Parameters

writer
Type: System.IOBinaryWriter
The binary stream to write te data to
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.OnReplayDeserialize Method

ReplaySnapshotOnReplayDeserialize Method
Called by the replay system when this ReplaySnapshot should be deserialized.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplayDeserialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to read the data from

Implements

IReplaySerializeOnReplayDeserialize(ReplayState)
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.OnReplaySerialize Method

ReplaySnapshotOnReplaySerialize Method
Called by the replay system when this ReplaySnapshot should be serialized.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnReplaySerialize(
    ReplayState state
)

Parameters

state
Type: UltimateReplayReplayState
The ReplayState to write the data to

Implements

IReplaySerializeOnReplaySerialize(ReplayState)
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.RecordSnapshot Method

ReplaySnapshotRecordSnapshot Method
Registers the specified replay state with this snapshot. The specified identity is used during playback to ensure that the replay objects receives the correct state to deserialize.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RecordSnapshot(
    ReplayIdentity identity,
    ReplayState state
)

Parameters

identity
Type: UltimateReplay.CoreReplayIdentity
The identity of the object that was serialized
state
Type: UltimateReplayReplayState
The state data for the object
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.Reset Method

ReplaySnapshotReset Method
Clears all state information from the snapshot but keeps the time stamp.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void Reset()
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.RestoreReplayObjects Method

ReplaySnapshotRestoreReplayObjects Method
Attempts to restore any replay objects that were spawned or despawned during this snapshot.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void RestoreReplayObjects(
    ReplayScene scene
)

Parameters

scene
Type: UltimateReplay.CoreReplayScene

[Missing <param name="scene"/> documentation for "M:UltimateReplay.Storage.ReplaySnapshot.RestoreReplayObjects(UltimateReplay.Core.ReplayScene)"]

See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.RestoreSnapshot Method

ReplaySnapshotRestoreSnapshot Method
Attempts to recall the state information for the specified replay object identity. If the identity does not exist in the scene then the return value will be null.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public ReplayState RestoreSnapshot(
    ReplayIdentity identity
)

Parameters

identity
Type: UltimateReplay.CoreReplayIdentity
The identity of the object to deserialize

Return Value

Type: ReplayState
The state information for the specified identity or null if the identity does not exist
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot Properties

ReplaySnapshot Properties

The ReplaySnapshot type exposes the following members.

Properties
 | Name | Description
Public property | Size | Get the size in bytes of the snapshot data.
Public property | TimeStamp | The time stamp for this snapshot. The time stamp is used to identify the snapshot location in the sequence.
Top
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.Size Property

ReplaySnapshotSize Property
Get the size in bytes of the snapshot data.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public int Size { get; }

Property Value

Type: Int32
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplaySnapshot.TimeStamp Property

ReplaySnapshotTimeStamp Property
The time stamp for this snapshot. The time stamp is used to identify the snapshot location in the sequence.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public float TimeStamp { get; }

Property Value

Type: Single
See Also

Reference

ReplaySnapshot Class
UltimateReplay.Storage Namespace


ReplayTarget Class

ReplayTarget Class
Represents and abstract storage device capable of holding recorded state data for playback at a later date. Depending upon implementation, a ReplayTarget may be volatile or non-volatile.
Inheritance Hierarchy
SystemObject
Object
Component
Behaviour
MonoBehaviour
UltimateReplayReplayBehaviour
UltimateReplay.StorageReplayTarget
UltimateReplay.StorageReplayMemoryTarget

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
[SerializableAttribute]
public abstract class ReplayTarget : ReplayBehaviour

The ReplayTarget type exposes the following members.

Constructors
 | Name | Description
Protected method | ReplayTarget | Initializes a new instance of the ReplayTarget class
Top
Methods
 | Name | Description
Public method | PrepareTarget | Called by the recording system to notify the active ReplayTarget of an upcoming event.
Public method | RecordSnapshot | Store a replay snapshot in the replay target.
Public method | RestoreSnapshot | Recall a snapshot from the replay target based on the specified replay offset.
Top
Fields
 | Name | Description
Protected field | duration | The amount of time in seconds that the current recording data lasts. If no data exists then the duration will dfault to a length of 0.
Top
Properties
 | Name | Description
Public property | Duration | The amount of time in seconds that this recording lasts.
Public property | MemorySize | Get the total amount of bytes that this replay uses.
Top
See Also

Reference

UltimateReplay.Storage Namespace


ReplayTarget Constructor

ReplayTarget Constructor
Initializes a new instance of the ReplayTarget class

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected ReplayTarget()
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTarget Fields

ReplayTarget Fields

The ReplayTarget type exposes the following members.

Fields
 | Name | Description
Protected field | duration | The amount of time in seconds that the current recording data lasts. If no data exists then the duration will dfault to a length of 0.
Top
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTarget.duration Field

ReplayTargetduration Field
The amount of time in seconds that the current recording data lasts. If no data exists then the duration will dfault to a length of 0.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected float duration

Field Value

Type: Single
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTarget Methods

ReplayTarget Methods

The ReplayTarget type exposes the following members.

Methods
 | Name | Description
Public method | PrepareTarget | Called by the recording system to notify the active ReplayTarget of an upcoming event.
Public method | RecordSnapshot | Store a replay snapshot in the replay target.
Public method | RestoreSnapshot | Recall a snapshot from the replay target based on the specified replay offset.
Top
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTarget.PrepareTarget Method

ReplayTargetPrepareTarget Method
Called by the recording system to notify the active ReplayTarget of an upcoming event.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public abstract void PrepareTarget(
    ReplayTargetTask mode
)

Parameters

mode
Type: UltimateReplay.StorageReplayTargetTask
The ReplayTargetTask that the target should prepare for
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTarget.RecordSnapshot Method

ReplayTargetRecordSnapshot Method
Store a replay snapshot in the replay target.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public abstract void RecordSnapshot(
    ReplaySnapshot state
)

Parameters

state
Type: UltimateReplay.StorageReplaySnapshot
The snapshot to store
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTarget.RestoreSnapshot Method

ReplayTargetRestoreSnapshot Method
Recall a snapshot from the replay target based on the specified replay offset.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public abstract ReplaySnapshot RestoreSnapshot(
    float offset
)

Parameters

offset
Type: SystemSingle
The offset pointing to the individual snapshot to recall

Return Value

Type: ReplaySnapshot
The replay snapshot at the specified offset
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTarget Properties

ReplayTarget Properties

The ReplayTarget type exposes the following members.

Properties
 | Name | Description
Public property | Duration | The amount of time in seconds that this recording lasts.
Public property | MemorySize | Get the total amount of bytes that this replay uses.
Top
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTarget.Duration Property

ReplayTargetDuration Property
The amount of time in seconds that this recording lasts.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public abstract float Duration { get; }

Property Value

Type: Single
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTarget.MemorySize Property

ReplayTargetMemorySize Property
Get the total amount of bytes that this replay uses.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public abstract int MemorySize { get; }

Property Value

Type: Int32
See Also

Reference

ReplayTarget Class
UltimateReplay.Storage Namespace


ReplayTargetTask Enumeration

ReplayTargetTask Enumeration
Represents a task that can be issued to a ReplayTarget.

Namespace: UltimateReplay.Storage
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public enum ReplayTargetTask
Members
Member name | Value | Description
Commit | 0 | The replay target should commit all data currently in memeory to its end destination. Similar to a flush method.
Discard | 1 | The replay target should discard any recorded data.
PrepareWrite | 2 | The replay target should prepare for subsequent write requests.
PrepareRead | 3 | The replay target should prepare for subsequent read requests.
See Also

Reference

UltimateReplay.Storage Namespace


UltimateReplay.Util Namespace

UltimateReplay.Util Namespace
Classes
 | Class | Description
Public class | BitConverterNonAlloc | Custom implmenetation of the BitConverter class that does not make any allocations. This is important as the methods may be called thousands of times per second.
Public class | MonoSingletonT | Singleton imeplentation using MonoBehaviour as a base class. A dedicated owner object is created so that the singleton instance can be attached to it.


BitConverterNonAlloc Class

BitConverterNonAlloc Class
Custom implmenetation of the BitConverter class that does not make any allocations. This is important as the methods may be called thousands of times per second.
Inheritance Hierarchy
SystemObject
UltimateReplay.UtilBitConverterNonAlloc

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static class BitConverterNonAlloc

The BitConverterNonAlloc type exposes the following members.

Methods
Name | Description
GetBool | Retreive a 8-bit bool from the specified byte array.
GetBytes(Byte, Boolean) | Store an 8-bit bool into the specified byte array.
GetBytes(Byte, Int16) | Store a 16 bit int into the specified byte array. The buffer to store the int which must have a size of 2 or greaterThe short value to store
GetBytes(Byte, Int32) | Store a 32-bit int into the specified byte array.
GetBytes(Byte, Single) | Store a 32-bit float into the specified byte array.
GetFloat | Retreive a 32-bit float from the specified byte array.
GetInt | Retreive a 32-bit int from the specified byte array.
GetShort | Retreive a 16-bit int from the specified byte array.
Top
See Also

Reference

UltimateReplay.Util Namespace


BitConverterNonAlloc Methods

BitConverterNonAlloc Methods

The BitConverterNonAlloc type exposes the following members.

Methods
Name | Description
GetBool | Retreive a 8-bit bool from the specified byte array.
GetBytes(Byte, Boolean) | Store an 8-bit bool into the specified byte array.
GetBytes(Byte, Int16) | Store a 16 bit int into the specified byte array. The buffer to store the int which must have a size of 2 or greaterThe short value to store
GetBytes(Byte, Int32) | Store a 32-bit int into the specified byte array.
GetBytes(Byte, Single) | Store a 32-bit float into the specified byte array.
GetFloat | Retreive a 32-bit float from the specified byte array.
GetInt | Retreive a 32-bit int from the specified byte array.
GetShort | Retreive a 16-bit int from the specified byte array.
Top
See Also

Reference

BitConverterNonAlloc Class
UltimateReplay.Util Namespace


BitConverterNonAlloc.GetBool Method

BitConverterNonAllocGetBool Method
Retreive a 8-bit bool from the specified byte array.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool GetBool(
    byte[] buffer
)

Parameters

buffer
Type: SystemByte
The buffer to retreive the bool from which must have a size of 1 or greater

Return Value

Type: Boolean
The unpacked bool value
See Also

Reference

BitConverterNonAlloc Class
UltimateReplay.Util Namespace


BitConverterNonAlloc.GetBytes Method

BitConverterNonAllocGetBytes Method
Overload List
Name | Description
GetBytes(Byte, Boolean) | Store an 8-bit bool into the specified byte array.
GetBytes(Byte, Int16) | Store a 16 bit int into the specified byte array. The buffer to store the int which must have a size of 2 or greaterThe short value to store
GetBytes(Byte, Int32) | Store a 32-bit int into the specified byte array.
GetBytes(Byte, Single) | Store a 32-bit float into the specified byte array.
Top
See Also

Reference

BitConverterNonAlloc Class
UltimateReplay.Util Namespace


BitConverterNonAlloc.GetBytes Method (Byte[], Boolean)

BitConverterNonAllocGetBytes Method (Byte, Boolean)
Store an 8-bit bool into the specified byte array.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void GetBytes(
    byte[] buffer,
    bool value
)

Parameters

buffer
Type: SystemByte
The buffer to store the bool which must have a size of 1 or greater
value
Type: SystemBoolean
The bool value to store
See Also

Reference

BitConverterNonAlloc Class
GetBytes Overload
UltimateReplay.Util Namespace


BitConverterNonAlloc.GetBytes Method (Byte[], Int16)

BitConverterNonAllocGetBytes Method (Byte, Int16)
Store a 16 bit int into the specified byte array. The buffer to store the int which must have a size of 2 or greaterThe short value to store

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void GetBytes(
    byte[] buffer,
    short value
)

Parameters

buffer
Type: SystemByte

[Missing <param name="buffer"/> documentation for "M:UltimateReplay.Util.BitConverterNonAlloc.GetBytes(System.Byte[],System.Int16)"]

value
Type: SystemInt16

[Missing <param name="value"/> documentation for "M:UltimateReplay.Util.BitConverterNonAlloc.GetBytes(System.Byte[],System.Int16)"]

See Also

Reference

BitConverterNonAlloc Class
GetBytes Overload
UltimateReplay.Util Namespace


BitConverterNonAlloc.GetBytes Method (Byte[], Int32)

BitConverterNonAllocGetBytes Method (Byte, Int32)
Store a 32-bit int into the specified byte array.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void GetBytes(
    byte[] buffer,
    int value
)

Parameters

buffer
Type: SystemByte
The buffer to store the int which must have a size of 4 or greater
value
Type: SystemInt32
The int value to store
See Also

Reference

BitConverterNonAlloc Class
GetBytes Overload
UltimateReplay.Util Namespace


BitConverterNonAlloc.GetBytes Method (Byte[], Single)

BitConverterNonAllocGetBytes Method (Byte, Single)
Store a 32-bit float into the specified byte array.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static void GetBytes(
    byte[] buffer,
    float value
)

Parameters

buffer
Type: SystemByte
The buffer to store the float which must have a size of 4 or greated
value
Type: SystemSingle
The float value to store
See Also

Reference

BitConverterNonAlloc Class
GetBytes Overload
UltimateReplay.Util Namespace


BitConverterNonAlloc.GetFloat Method

BitConverterNonAllocGetFloat Method
Retreive a 32-bit float from the specified byte array.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static float GetFloat(
    byte[] buffer
)

Parameters

buffer
Type: SystemByte
The buffer to retreive the float from which must have a size of 4 or greater

Return Value

Type: Single
The unpacked float value
See Also

Reference

BitConverterNonAlloc Class
UltimateReplay.Util Namespace


BitConverterNonAlloc.GetInt Method

BitConverterNonAllocGetInt Method
Retreive a 32-bit int from the specified byte array.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static int GetInt(
    byte[] buffer
)

Parameters

buffer
Type: SystemByte
The buffer to retreive the int from which must have a size of 4 or greater

Return Value

Type: Int32
The unpacked int value
See Also

Reference

BitConverterNonAlloc Class
UltimateReplay.Util Namespace


BitConverterNonAlloc.GetShort Method

BitConverterNonAllocGetShort Method
Retreive a 16-bit int from the specified byte array.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static short GetShort(
    byte[] buffer
)

Parameters

buffer
Type: SystemByte
The buffer to retreive the short from which must have a size of 2 or greater

Return Value

Type: Int16
The unpacked short value
See Also

Reference

BitConverterNonAlloc Class
UltimateReplay.Util Namespace


MonoSingleton(T) Class

MonoSingletonT Class
Singleton imeplentation using MonoBehaviour as a base class. A dedicated owner object is created so that the singleton instance can be attached to it.
Inheritance Hierarchy
SystemObject
Object
Component
Behaviour
MonoBehaviour
UltimateReplay.UtilMonoSingletonT
UltimateReplayReplayManager

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public abstract class MonoSingleton<T> : MonoBehaviour
where T : MonoSingleton<T>

Type Parameters

T
The generic type that the singleton is wrapping

The MonoSingletonT type exposes the following members.

Constructors
 | Name | Description
Protected method | MonoSingletonT | Initializes a new instance of the MonoSingletonT class
Top
Methods
 | Name | Description
Public method | Awake | Called by Unity. Allows the singleton to find and claim any scene instances.
 | ForceAwake | Attempts to forcefully create the singleton instance if one does not already exist.
Public method | OnApplicationQuit | Called by Unity. Allows the singleton to prevent recreation of the instance when the game is about to quit.
Top
Fields
Name | Description
active | The active singleton instance or null if no instance has been created yet. Use Active to guarentee that the instance is non-null.
Top
Properties
Name | Description
Active | Get the active singleton instance. If not instance exists then one is created.
IsDisposing | Returns true if the singleton is currently disposing. This will only occur when the game is about to quit.
Top
See Also

Reference

UltimateReplay.Util Namespace


MonoSingleton(T) Constructor

MonoSingletonT Constructor
Initializes a new instance of the MonoSingletonT class

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected MonoSingleton()
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace


MonoSingleton(T) Fields

MonoSingletonT Fields

The MonoSingletonT generic type exposes the following members.

Fields
Name | Description
active | The active singleton instance or null if no instance has been created yet. Use Active to guarentee that the instance is non-null.
Top
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace


MonoSingleton(T).active Field

MonoSingletonTactive Field
The active singleton instance or null if no instance has been created yet. Use Active to guarentee that the instance is non-null.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected static T active

Field Value

Type: T
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace


MonoSingleton(T) Methods

MonoSingletonT Methods

The MonoSingletonT generic type exposes the following members.

Methods
 | Name | Description
Public method | Awake | Called by Unity. Allows the singleton to find and claim any scene instances.
 | ForceAwake | Attempts to forcefully create the singleton instance if one does not already exist.
Public method | OnApplicationQuit | Called by Unity. Allows the singleton to prevent recreation of the instance when the game is about to quit.
Top
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace


MonoSingleton(T).Awake Method

MonoSingletonTAwake Method
Called by Unity. Allows the singleton to find and claim any scene instances.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public virtual void Awake()
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace


MonoSingleton(T).ForceAwake Method

MonoSingletonTForceAwake Method
Attempts to forcefully create the singleton instance if one does not already exist.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static T ForceAwake()

Return Value

Type: T
The active singleton instance
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace


MonoSingleton(T).OnApplicationQuit Method

MonoSingletonTOnApplicationQuit Method
Called by Unity. Allows the singleton to prevent recreation of the instance when the game is about to quit.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public void OnApplicationQuit()
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace


MonoSingleton(T) Properties

MonoSingletonT Properties

The MonoSingletonT generic type exposes the following members.

Properties
Name | Description
Active | Get the active singleton instance. If not instance exists then one is created.
IsDisposing | Returns true if the singleton is currently disposing. This will only occur when the game is about to quit.
Top
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace


MonoSingleton(T).Active Property

MonoSingletonTActive Property
Get the active singleton instance. If not instance exists then one is created.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
protected static T Active { get; }

Property Value

Type: T
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace


MonoSingleton(T).IsDisposing Property

MonoSingletonTIsDisposing Property
Returns true if the singleton is currently disposing. This will only occur when the game is about to quit.

Namespace: UltimateReplay.Util
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy
public static bool IsDisposing { get; }

Property Value

Type: Boolean
See Also

Reference

MonoSingletonT Class
UltimateReplay.Util Namespace