ReplayManager Methods

Ultimate Replay

ReplayManager Methods

The ReplayManager type exposes the following members.

Methods
  Name Description
Public method Static member 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.
Public method Static member 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.
Public method Static member 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
Public method Static member 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.
Public method Static member FindReplayPrefab
Attempts to find the prefab with the matching name. This is used to restore objects that were destroyed during recording.
Public method Static member 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.
Public method Static member PausePlayback
Use this method to pause replay playback while maintinaing the current replay state. See ResumePlayback to continue a playback.
Public method Static member 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.
Public method Static member 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.
Public method Static member ReplayDestroy
Attempts to destroy the specified prefab. OnReplayDestroy will be called if a listener has been registered otherwise default destruction will be used.
Public method Static member ReplayInstantiate
Attempts to instantiate the specified prefab. OnReplayInstantiate will be called if a listener has been registered otherwise default instantiation will be used.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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.
Public method Static member 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