static VideoWriter CreateVideoWriter( string path, Sandbox.VideoWriter/Config config )

robot_2Generated
code_blocksInput

Description

The CreateVideoWriter method in the Editor.EditorUtility class is a static method used to create a new instance of a VideoWriter. This method is particularly useful for setting up video recording sessions with specific configurations.

Usage

To use the CreateVideoWriter method, you need to provide a file path where the video will be saved and a configuration object that specifies the settings for the video recording. The method returns a VideoWriter object that can be used to control the video recording process.

Example

// Example of using CreateVideoWriter
string videoPath = "C:\\Videos\\output.mp4";
var config = new VideoWriter.Config
{
    Width = 1920,
    Height = 1080,
    FrameRate = 30
};

VideoWriter videoWriter = Editor.EditorUtility.CreateVideoWriter(videoPath, config);

// Use the videoWriter to start recording, add frames, etc.