docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RecorderController

    Main class to use the Recorder framework via script. Controls recording states like start and stop.

    Inheritance
    object
    RecorderController
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Recorder
    Assembly: Unity.Recorder.Editor.dll
    Syntax
    public class RecorderController

    Constructors

    RecorderController(RecorderControllerSettings)

    The constructor of the RecorderController.

    Declaration
    public RecorderController(RecorderControllerSettings settings)
    Parameters
    Type Name Description
    RecorderControllerSettings settings

    The settings 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:

    1. The settings is set to a time (or frame) interval and the end time (or last frame) was reached.
    2. Calling the StopRecording method.
    3. Exiting Playmode.
    Declaration
    public bool IsRecording()
    Returns
    Type Description
    bool

    True if at least one recording is still active. false otherwise.

    See Also
    SetRecordModeToSingleFrame(int)
    SetRecordModeToFrameInterval(int, int)
    SetRecordModeToTimeInterval(float, float)

    PrepareRecording()

    Prepares the recording context. To start recording once you've called this method, you must call StartRecording().

    Declaration
    public void PrepareRecording()
    Remarks

    Sets up the internal data for the recording session and pauses the simulation to ensure a proper synchronization between the Recorder and the Unity Editor.

    Exceptions
    Type Condition
    NullReferenceException

    When the settings are null.

    InvalidOperationException

    When there are multiple recorders and accumulation is enabled for one of them.

    StartRecording()

    Starts the recording (works only in Play mode). To use this method, you must first have called PrepareRecording() to set up the recording context. Also ensure that you've finished loading any additional Scene data required before you start recording.

    Declaration
    public bool StartRecording()
    Returns
    Type Description
    bool

    false if an error occured. The console 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()
    See Also
    SetRecordModeToManual()
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)