Photon Quantum 3.0.0

Public Member Functions | Public Attributes | List of all members
Quantum.QuantumInstantReplayDemo Class Reference

A script to demonstrate the instant replay feature of Quantum. Add this script to a GameObject in your scene to enable the instant replays. Press the "Start" button during runtime to start a replay. Uses the QuantumInstantReplay class. More...

Inheritance diagram for Quantum.QuantumInstantReplayDemo:
Quantum.QuantumMonoBehaviour

Public Member Functions

void Awake ()
 Unity Awake event, subscribe to the game destroyed event and clean up stopped replays. More...
 
void Editor_StartInstantReplay ()
 Is called from the inspector to start the instant replay. More...
 
void Editor_StopInstantReplay ()
 Is called from the inspector to stop the instant replay. More...
 
void OnDestroy ()
 Unity OnDestroy event, destroys the fading texture. More...
 
void OnDisable ()
 Unity OnDisabled event, disposes the instant replay data structures. More...
 
void OnGUI ()
 Unity OnGUI event, displays the replay label and the replay slider. More...
 
void Update ()
 Unity Update event. Toggle recording snapshots and update the replay. Update the debug buttons and trigger seeking the replay. More...
 

Public Attributes

bool Button_StartInstantReplay
 Read-only flag to indicate the start button can be pressed. More...
 
bool Button_StopInstantReplay
 Read-only flag to indicate the stop button can be pressed. More...
 
bool EnableLoop = false
 Loops the replay. Only available when RewindMode is not disabled. More...
 
bool IsReplayRunning
 Read-only flag to indicate if the replay is running. More...
 
float NormalizedTime
 The replay normalized time. This value is between 0 and 1. Use the slider to jump to a desired time in the replay. More...
 
float PlaybackSpeed = 1.0f
 The playback speed of the replay. Default is 1.0f. More...
 
float ReplayLengthSec = 2.0f
 The length of the replay in seconds. Default is 2.0f. More...
 
QuantumInstantReplaySeekMode RewindMode = QuantumInstantReplaySeekMode.Disabled
 Set the rewind mode to loop the replay or seek to a desired frame. More...
 
bool ShowFadingEffect = true
 If set to true, displays a fading effect when starting and stopping the replay. More...
 
bool ShowReplayLabel = true
 If set to true, displays a replay label on the screen during the replay. More...
 

Detailed Description

A script to demonstrate the instant replay feature of Quantum. Add this script to a GameObject in your scene to enable the instant replays. Press the "Start" button during runtime to start a replay. Uses the QuantumInstantReplay class.

Member Function Documentation

◆ Awake()

void Quantum.QuantumInstantReplayDemo.Awake ( )
inline

Unity Awake event, subscribe to the game destroyed event and clean up stopped replays.

◆ Update()

void Quantum.QuantumInstantReplayDemo.Update ( )
inline

Unity Update event. Toggle recording snapshots and update the replay. Update the debug buttons and trigger seeking the replay.

◆ OnDisable()

void Quantum.QuantumInstantReplayDemo.OnDisable ( )
inline

Unity OnDisabled event, disposes the instant replay data structures.

◆ OnDestroy()

void Quantum.QuantumInstantReplayDemo.OnDestroy ( )
inline

Unity OnDestroy event, destroys the fading texture.

◆ OnGUI()

void Quantum.QuantumInstantReplayDemo.OnGUI ( )
inline

Unity OnGUI event, displays the replay label and the replay slider.

◆ Editor_StartInstantReplay()

void Quantum.QuantumInstantReplayDemo.Editor_StartInstantReplay ( )
inline

Is called from the inspector to start the instant replay.

◆ Editor_StopInstantReplay()

void Quantum.QuantumInstantReplayDemo.Editor_StopInstantReplay ( )
inline

Is called from the inspector to stop the instant replay.

Member Data Documentation

◆ PlaybackSpeed

float Quantum.QuantumInstantReplayDemo.PlaybackSpeed = 1.0f

The playback speed of the replay. Default is 1.0f.

◆ ReplayLengthSec

float Quantum.QuantumInstantReplayDemo.ReplayLengthSec = 2.0f

The length of the replay in seconds. Default is 2.0f.

◆ ShowReplayLabel

bool Quantum.QuantumInstantReplayDemo.ShowReplayLabel = true

If set to true, displays a replay label on the screen during the replay.

◆ ShowFadingEffect

bool Quantum.QuantumInstantReplayDemo.ShowFadingEffect = true

If set to true, displays a fading effect when starting and stopping the replay.

◆ IsReplayRunning

bool Quantum.QuantumInstantReplayDemo.IsReplayRunning

Read-only flag to indicate if the replay is running.

◆ Button_StartInstantReplay

bool Quantum.QuantumInstantReplayDemo.Button_StartInstantReplay

Read-only flag to indicate the start button can be pressed.

◆ Button_StopInstantReplay

bool Quantum.QuantumInstantReplayDemo.Button_StopInstantReplay

Read-only flag to indicate the stop button can be pressed.

◆ RewindMode

QuantumInstantReplaySeekMode Quantum.QuantumInstantReplayDemo.RewindMode = QuantumInstantReplaySeekMode.Disabled

Set the rewind mode to loop the replay or seek to a desired frame.

◆ EnableLoop

bool Quantum.QuantumInstantReplayDemo.EnableLoop = false

Loops the replay. Only available when RewindMode is not disabled.

◆ NormalizedTime

float Quantum.QuantumInstantReplayDemo.NormalizedTime

The replay normalized time. This value is between 0 and 1. Use the slider to jump to a desired time in the replay.