Ultimate Replay Scripting Reference
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.
![](SectionExpanded.png)
SystemObject Object
Component
Behaviour
MonoBehaviour
UltimateReplayReplayBehaviour
UltimateReplayReplayAudio
UltimateReplayReplayTransform
UltimateReplay.StorageReplayTarget
Component
Behaviour
MonoBehaviour
UltimateReplayReplayBehaviour
UltimateReplayReplayAudio
UltimateReplayReplayTransform
UltimateReplay.StorageReplayTarget
Namespace: UltimateReplay
Assembly: UltimateReplay (in UltimateReplay.dll) Version: 1.0.0.0 (1.0.0.0)
![](SectionExpanded.png)
C#
public abstract class ReplayBehaviour : MonoBehaviour, IReplaySerialize
The ReplayBehaviour type exposes the following members.
![](SectionExpanded.png)
Name | Description | |
---|---|---|
![]() | ReplayBehaviour | Initializes a new instance of the ReplayBehaviour class |
![](SectionExpanded.png)
Name | Description | |
---|---|---|
![]() | Awake |
Called by Unity.
Allows the ReplayBehaviour to validate its identity and register its self with the replay system.
|
![]() | OnReplayDeserialize |
Called by the replay system when all replay state information should be deserialized.
|
![]() | 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'
|
![]() | OnReplayEvent |
Called by the replay system when an event has been received during playback.
|
![]() | OnReplayPlayPause |
Called by the replay system when playback is about to be paused or resumed.
|
![]() | OnReplaySerialize |
Called by the replay system when all replay state information should be serialized.
|
![]() | 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.
|
![]() | OnReplayUpdate |
Called by the replay system every frame while playback is active.
|
![]() | ReplayDeserializeEvents |
Deserializes all active ReplayEvent from the state and dispatches any events to the OnReplayEvent(ReplayEvent) handler.
|
![]() | ReplayDeserializeVariables |
Deserializes all active ReplayVariable from the state.
|
![]() | ReplayFindVariables |
Attempts to find any variables marked with the ReplayVarAttribute so that they can be serialized later.
|
![]() | ReplayInterpolateVariables |
Allows all active ReplayVariable to be interpolated betwen replay frames.
|
![]() | ReplayRecordEvent(Byte, ReplayState) |
Push an event to the replay system for recording.
|
![]() | ReplayRecordEvent(ReplayEvents, ReplayState) |
Push an event to the replay system for recording.
|
![]() | ReplaySerializeEvents |
Serializes all awaiting ReplayEvent to the state.
|
![]() | ReplaySerializeVariables |
Serializes all active ReplayVariable to the state.
|
![]() | Reset |
Called by Unity while in editor mode.
Allows the unique id to be generated when the script is attached to an object.
|
![](SectionExpanded.png)
Name | Description | |
---|---|---|
![]() | Identity |
Get the ReplayIdentity associated with this ReplayBehaviour.
|
![]() | IsRecording |
Returns true if the active replay manager is currently recording the scene.
Note: If recording is paused this value will still be true.
|
![]() | 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.
|
![]() | PlaybackDirection |
Gets the current PlaybackDirection of replay playback.
|
![](SectionExpanded.png)