QuiltCapture.cs

Provides a way to record quilt videos from within Unity scenes.

Fields

string FileName

File name of the output video. If it's empty, it will be set to the default (see QuiltCapture.DefaultFileName).

OutputFolder FolderPath

The path to the folder where the Recorder saves the output files.

int TakeNumber

The key name corresponding to the take number value stored in LKGPlayerPrefs.

QuiltCaptureMode CaptureMode

Manual: Use the โ€œRecordโ€ and โ€œStopโ€ buttons during Play mode.

Frame Interval: Set Start and End frames.

Time Interval: Set Start and End times (seconds).

Clip Length: Select a Video Player with the โ€œSynced Videoโ€ field. Upon play, Quilt Capture will start and stop a recording to fit the beginning and end of the video clip.

Single Frame: Save a single frame as .png.

bool RecordOnStart

Whether the recording begins once the scene plays (only used when CaptureMode is set to Manual).

bool ExitPlayModeOnStop

When set to true, play mode will exit when the recording is stopped.

int StartFrame

Which frame should the recording start (only used when CaptureMode is set to Frame Interval).

int EndFrame

Which frame should the recording end (only used when CaptureMode is set to Frame Interval).

float StartTime

When the recording should start, in seconds (only used when CaptureMode is set to Time Interval).

float EndTime

When the recording should start, in seconds (only used when CaptureMode is set to Time Interval).

VideoPlayer SyncedVideoPlayer

Set this to reference a VideoPlayer if you wish to align the time values of this recording to the time values of the media playback. This also finishes the recording when the referenced VideoPlayer finishes.

QuiltRecordingPreset RecordingPreset

Determines the settings for output quilt videos. Selects from a collection of quilt and codec presets based on device and quality. Only used when CaptureMode is NOT set to Single Frame (Screenshot).

QuiltRecordingSettings RecordingSettings

The settings that will be used for recordings.

The aspect returned is always greater than zero, substituted using the same logic as HologramCamera.Aspect for values less than or equal to zero. Only used when CaptureMode is NOT set to Single Frame (Screenshot).

QuiltScreenshotPreset ScreenshotPreset

Determines the settings for output quilts for screenshots. Selects from a collection of quilt presets based on device. Only used when CaptureMode is set to Single Frame (Screenshot).

QuiltCaptureOverrideSettings ScreenshotSettings

The settings that will be used for screenshots.

The aspect returned is always greater than zero, substituted using the same logic as HologramCamera.Aspect for values less than or equal to zero.

QuiltRecordingSettings CustomRecordingSettings

The settings that will be used for recordings when RecordingPreset is set to QuiltRecordingPreset.Custom. The aspect returned is always greater than zero, substituted using the same logic as HologramCamera.Aspect for values less than or equal to zero.

QuiltCaptureOverrideSettings CustomScreenshotSettings

A collection of settings that may be applied to single frame capture/screenshots (only used when ScreenshotPreset is set to Custom)

Functions

ScreenshotProgress Screenshot2D(bool writePNGMetadata = true)

Take a screenshot of what is displayed in the center position of the Hologram Camera capture range. Optional parameter to encode metadata specifying that the image was captured with the Looking Glass Unity plugin.

ScreenshotProgress Screenshot2D(string outputFilePath, bool writePNGMetadata = true)

Same as above, but saving to a specific file path. Optional parameter to encode metadata specifying that the image was captured with the Looking Glass Unity plugin.

ScreenshotProgress Screenshot3D(bool writePNGMetadata = true)

Take a quilt screenshot of what is displayed in the Hologram Camera. Optional parameter to encode metadata specifying that the image was captured with the Looking Glass Unity plugin.

ScreenshotProgress Screenshot3D(string outputFilePath, bool writePNGMetadata = true)

Same as above, but saving to a specific file path. Optional parameter to encode metadata specifying that the image was captured with the Looking Glass Unity plugin.

void StartRecording()

Start recording.

void StartRecording(string outputFilePath)

Same as above, setting the output file to outputFilePath.

void PauseRecording()

Pause recording.

void ResumeRecording()

Resume (unpause) recording.

void StopRecording()

Stop (and save) recording.

Last updated

#502: August 18 Changes

Change request updated