ReplayBehaviour Class

Ultimate Replay

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#
public abstract class ReplayBehaviour : MonoBehaviour, 
	IReplaySerialize

The ReplayBehaviour type exposes the following members.

Constructors
  NameDescription
Protected methodReplayBehaviour
Initializes a new instance of the ReplayBehaviour class
Top
Methods
  NameDescription
Public methodAwake
Called by Unity. Allows the ReplayBehaviour to validate its identity and register its self with the replay system.
Public methodOnReplayDeserialize
Called by the replay system when all replay state information should be deserialized.
Public methodOnReplayEnd
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 methodOnReplayEvent
Called by the replay system when an event has been received during playback.
Public methodOnReplayPlayPause
Called by the replay system when playback is about to be paused or resumed.
Public methodOnReplaySerialize
Called by the replay system when all replay state information should be serialized.
Public methodOnReplayStart
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 methodOnReplayUpdate
Called by the replay system every frame while playback is active.
Protected methodReplayDeserializeEvents
Deserializes all active ReplayEvent from the state and dispatches any events to the OnReplayEvent(ReplayEvent) handler.
Protected methodReplayDeserializeVariables
Deserializes all active ReplayVariable from the state.
Protected methodReplayFindVariables
Attempts to find any variables marked with the ReplayVarAttribute so that they can be serialized later.
Protected methodReplayInterpolateVariables
Allows all active ReplayVariable to be interpolated betwen replay frames.
Public methodReplayRecordEvent(Byte, ReplayState)
Push an event to the replay system for recording.
Public methodReplayRecordEvent(ReplayEvents, ReplayState)
Push an event to the replay system for recording.
Protected methodReplaySerializeEvents
Serializes all awaiting ReplayEvent to the state.
Protected methodReplaySerializeVariables
Serializes all active ReplayVariable to the state.
Public methodReset
Called by Unity while in editor mode. Allows the unique id to be generated when the script is attached to an object.
Top
Properties
  NameDescription
Public propertyIdentity
Get the ReplayIdentity associated with this ReplayBehaviour.
Public propertyIsRecording
Returns true if the active replay manager is currently recording the scene. Note: If recording is paused this value will still be true.
Public propertyIsReplaying
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 propertyPlaybackDirection
Gets the current PlaybackDirection of replay playback.
Top
See Also