Class RecorderController
Main class to use the Recorder framework via script. Controls recording states like start and stop.
Namespace: UnityEditor.Recorder
Syntax
public class RecorderController
Constructors
RecorderController(RecorderControllerSettings)
A RecorderController requires a RecorderControllerSettings.
Declaration
public RecorderController(RecorderControllerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
RecorderControllerSettings | settings | The RecorderControllerSettings to be used by this RecorderController. |
Properties
Settings
Current settings used by this RecorderControler.
Declaration
public RecorderControllerSettings Settings { get; }
Property Value
Type | Description |
---|---|
RecorderControllerSettings |
Methods
IsRecording()
Use this method to know if all recorders are done recording. A recording stops:
- The settings is set to a time (or frame) interval and the end time (or last frame) was reached.
- Calling the StopRecording method.
- Exiting Playmode.
Declaration
public bool IsRecording()
Returns
Type | Description |
---|---|
Boolean | True if at least one recording is still active. false otherwise. |
See Also
StartRecording()
Start recording. Works only in Playmode.
Declaration
public bool StartRecording()
Returns
Type | Description |
---|---|
Boolean | false if an error occured. The console will usually contains logs about the errors. |
Exceptions
Type | Condition |
---|---|
Exception | If not in Playmode. |
NullReferenceException | If settings is null. |
StopRecording()
Stops all active recordings. Most recordings will create the recorded file once stopped. If the settings is using Manual recording mode. then the only way to stop recording is by calling this method or by exiting Playmode.
Declaration
public void StopRecording()