float VideoLength { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The VideoLength property of the AssetPreview class specifies the duration of the video that should be generated for the asset preview. This property is useful when creating video previews of assets, allowing you to define how long the video should run.

Usage

To use the VideoLength property, you can get or set its value to determine or specify the length of the video preview in seconds. This property is particularly useful when you need to control the duration of video previews for assets in the editor.

Example

// Example of setting the VideoLength property
AssetPreview assetPreview = new AssetPreview();
assetPreview.VideoLength = 10.0f; // Set the video length to 10 seconds

// Example of getting the VideoLength property
float currentVideoLength = assetPreview.VideoLength;
Console.WriteLine($"Current video length: {currentVideoLength} seconds");