Show / Hide Table of Contents

Class Recorder

Used for building recordings and keeping up with all the child recorders.

Inheritance
System.Object
Recorder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Recolude.Core.Record
Assembly: Recolude.Core.dll
Syntax
public class Recorder
Remarks

Metadata set will persist accross multiple recordings unless cleared with ClearMetadata().

Constructors

Recorder()

Declaration
public Recorder()

Recorder(ITimerManager, RecorderInfo, List<Recorder>, IEnumerable<ICaptureRecorder<ICapture>>)

Declaration
public Recorder(ITimerManager timeManager, RecorderInfo recorderInfo, List<Recorder> subRecorders, IEnumerable<ICaptureRecorder<ICapture>> captureRecorders)
Parameters
Type Name Description
ITimerManager timeManager
RecorderInfo recorderInfo
System.Collections.Generic.List<Recorder> subRecorders
System.Collections.Generic.IEnumerable<ICaptureRecorder<ICapture>> captureRecorders

Recorder(String, String, Metadata)

Declaration
public Recorder(string id, string name, Metadata metadata)
Parameters
Type Name Description
System.String id
System.String name
Metadata metadata

Methods

AddOnRecordingCompleteCallback(UnityAction<IRecording>)

Registers a callback to be invoked whenever the Finish() method is called.

Declaration
public void AddOnRecordingCompleteCallback(UnityAction<IRecording> callback)
Parameters
Type Name Description
UnityEngine.Events.UnityAction<IRecording> callback

The callback to be executed

Build(Single, Single, IEnumerable<Vector2>)

Declaration
public IRecording Build(float startTime, float endTime, IEnumerable<Vector2> pauseSlices)
Parameters
Type Name Description
System.Single startTime
System.Single endTime
System.Collections.Generic.IEnumerable<UnityEngine.Vector2> pauseSlices
Returns
Type Description
IRecording

CaptureCustomEvent(String, Metadata)

If you want to keep up with something special that occurred at a certain time in your recording, then you can call this function with the details of the special event.

Declaration
public void CaptureCustomEvent(string name, Metadata contents)
Parameters
Type Name Description
System.String name

Name of the event.

Metadata contents

Details of the event.

Remarks

Will be ignored if the recorder is currently paused.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the recorder is stopped.

CaptureCustomEvent(String, Dictionary<String, IProperty>)

If you want to keep up with something special that occurred at a certain time in your recording, then you can call this function with the details of the special event.

Declaration
public void CaptureCustomEvent(string name, Dictionary<string, IProperty> contents)
Parameters
Type Name Description
System.String name

Name of the event.

System.Collections.Generic.Dictionary<System.String, IProperty> contents

Details of the event.

Remarks

Will be ignored if the recorder is currently paused.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the recorder is stopped.

CaptureCustomEvent(String, Dictionary<String, String>)

If you want to keep up with something special that occurred at a certain time in your recording, then you can call this function with the details of the special event.

Declaration
public void CaptureCustomEvent(string name, Dictionary<string, string> contents)
Parameters
Type Name Description
System.String name

Name of the event.

System.Collections.Generic.Dictionary<System.String, System.String> contents

Details of the event.

Remarks

Will be ignored if the recorder is currently paused.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the recorder is stopped.

CaptureCustomEvent(String, String)

If you want to keep up with something special that occurred at a certain time in your recording, then you can call this function with the details of the special event.

Declaration
public void CaptureCustomEvent(string name, string contents)
Parameters
Type Name Description
System.String name

Name of the event.

System.String contents

Details of the event.

Remarks

Will be ignored if the recorder is currently paused.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the recorder is stopped.

ClearMetadata()

Clears all meta data that has been set up to this point.

Declaration
public void ClearMetadata()

ClearOnRecordingCompleteListeners()

Removes all callbacks from being called when Finish() is invoked

Declaration
public void ClearOnRecordingCompleteListeners()

ClearSubjects()

Removes all registered subjects that where going to be recorded, removing any chance that their data will make it to the final recording.

Declaration
public void ClearSubjects()
Exceptions
Type Condition
System.InvalidOperationException

Thrown when a recording is already in progress.

CurrentlyPaused()

Whether or not the recorder is paused. When the recorder is paused, custom events logged will be ignored.

Declaration
public bool CurrentlyPaused()
Returns
Type Description
System.Boolean

True if the recorder is paused.

CurrentlyRecording()

Whether or not we are accepting events occuring.

Declaration
public bool CurrentlyRecording()
Returns
Type Description
System.Boolean

True if we are accepting events.

CurrentlyStopped()

Whether or not the recorder has begun recording.

Declaration
public bool CurrentlyStopped()
Returns
Type Description
System.Boolean

True if it has not started recording.

CurrentRecording()

Takes everything the recorder has seen so far and builds a recording from it, without stopping the recording process.

Declaration
public IRecording CurrentRecording()
Returns
Type Description
IRecording

A recording representing everything we've seen up until this point in time.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the recorder is stopped.

CurrentState()

The current state the recorder is in.

Declaration
public RecordingState CurrentState()
Returns
Type Description
RecordingState

The current recorder state.

Finish()

Stops the recorder and builds a recording for playback. Once a recorder is finished it is free to start making a whole new recording.

Declaration
public Recording Finish()
Returns
Type Description
Recording

A recording containing everything the recorder captured while not paused.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the recorder is stopped.

GetMetaData(String)

Declaration
public IProperty GetMetaData(string key)
Parameters
Type Name Description
System.String key
Returns
Type Description
IProperty

GetTimeProvider()

Declaration
public ITimeProvider GetTimeProvider()
Returns
Type Description
ITimeProvider

Pause()

Moves the recorder state to be paused. Custom events that occur during this state are ignored.

Declaration
public void Pause()
Exceptions
Type Condition
System.InvalidOperationException

Thrown when the recorder is not recording.

Register(Recorder[])

Adds child recorders for this recorder to include when building recordings.

Declaration
public void Register(params Recorder[] childRecorders)
Parameters
Type Name Description
Recorder[] childRecorders

The children recorders to keep up with.

Register(RecorderInfo, IEnumerable<ICaptureRecorder<ICapture>>)

Declaration
public Recorder Register(RecorderInfo info, IEnumerable<ICaptureRecorder<ICapture>> captureRecorders)
Parameters
Type Name Description
RecorderInfo info
System.Collections.Generic.IEnumerable<ICaptureRecorder<ICapture>> captureRecorders
Returns
Type Description
Recorder

Register(SubjectConfigBehavior)

Declaration
public Recorder Register(SubjectConfigBehavior subject)
Parameters
Type Name Description
SubjectConfigBehavior subject
Returns
Type Description
Recorder

Register(String, String)

Declaration
public Recorder Register(string id, string name)
Parameters
Type Name Description
System.String id
System.String name
Returns
Type Description
Recorder

Register(GameObject)

Declaration
public Recorder Register(GameObject subject)
Parameters
Type Name Description
UnityEngine.GameObject subject
Returns
Type Description
Recorder

Register(GameObject, String)

Declaration
public Recorder Register(GameObject subject, string name)
Parameters
Type Name Description
UnityEngine.GameObject subject
System.String name
Returns
Type Description
Recorder

Register(GameObject, String, String, Metadata)

Declaration
public Recorder Register(GameObject subject, string id, string name, Metadata metadata)
Parameters
Type Name Description
UnityEngine.GameObject subject
System.String id
System.String name
Metadata metadata
Returns
Type Description
Recorder

RemoveOnRecordingCompleteCallback(UnityAction<IRecording>)

Removes a previously registered callback from being invoked when the Finish() method is called.

Declaration
public void RemoveOnRecordingCompleteCallback(UnityAction<IRecording> callback)
Parameters
Type Name Description
UnityEngine.Events.UnityAction<IRecording> callback

The callback to be removed

Resume()

Returns a recorder to a recording state if it was paused.

Declaration
public void Resume()
Exceptions
Type Condition
System.InvalidOperationException

Thrown when the recorder is not paused.

SetMetaData(String, IProperty)

Set a key value pair for meta data.

Declaration
public void SetMetaData(string key, IProperty value)
Parameters
Type Name Description
System.String key

Dictionary Key.

IProperty value

Value.

SetMetaData(String, Int32)

Declaration
public void SetMetaData(string key, int value)
Parameters
Type Name Description
System.String key
System.Int32 value

SetMetaData(String, String)

Declaration
public void SetMetaData(string key, string value)
Parameters
Type Name Description
System.String key
System.String value

Start()

Starts recording the subjects.

Declaration
public void Start()
Exceptions
Type Condition
System.InvalidOperationException

Thrown when a recording is already in progress.

SubRecorders()

The different subjects to include in our recording.

Declaration
public List<Recorder> SubRecorders()
Returns
Type Description
System.Collections.Generic.List<Recorder>

The different subjects to include in our recording.

Back to top Generated by DocFX