Legacy Documentation: Version 2017.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

VideoClipImporter

class in UnityEditor

/

Inherits from:AssetImporter

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

VideoClipImporter lets you modify VideoClip import settings from Editor scripts.

See the Movie File Format Support Notes section in the VideoPlayer class documentation for supported movie file formats and encoding guidelines.

Variables

defaultTargetSettingsDefault values for the platform-specific import settings.
deinterlaceModeImages are deinterlaced during transcode. This tells the importer how to interpret fields in the source, if any.
flipHorizontalApply a horizontal flip during import.
flipVerticalApply a vertical flip during import.
frameCountNumber of frames in the clip.
frameRateFrame rate of the clip.
importAudioImport audio tracks from source file.
isPlayingPreviewWhether the preview is currently playing.
keepAlphaWhether to keep the alpha from the source into the transcoded clip.
linearColorUsed in legacy import mode. Same as MovieImport.linearTexture.
outputFileSizeSize in bytes of the file once imported.
qualityUsed in legacy import mode. Same as MovieImport.quality.
sourceAudioTrackCountNumber of audio tracks in the source file.
sourceFileSizeSize in bytes of the file before importing.
sourceHasAlphaTrue if the source file has a channel for per-pixel transparency.
useLegacyImporterWhether to import a MovieTexture (legacy) or a VideoClip.

Public Functions

ClearTargetSettingsClear the platform-specific import settings for the specified platform, causing them to go back to the default settings.
GetPreviewTextureReturns a texture with the transcoded clip's current frame. Returns frame 0 when not playing, and frame at current time when playing.
GetResizeHeightGet the resulting height of the resize operation for the specified resize mode.
GetResizeModeNameGet the full name of the resize operation for the specified resize mode.
GetResizeWidthGet the resulting width of the resize operation for the specified resize mode.
GetSourceAudioChannelCountNumber of audio channels in the specified source track.
GetSourceAudioSampleRateSample rate of the specified audio track.
GetTargetSettingsReturns the platform-specific import settings for the specified platform.
PlayPreviewStarts preview playback.
SetTargetSettingsSets the platform-specific import settings for the specified platform.
StopPreviewStops preview playback.

Inherited members

Variables

assetBundleNameGet or set the AssetBundle name.
assetBundleVariantGet or set the AssetBundle variant.
assetPathThe path name of the asset for this importer. (Read Only)
userDataGet or set any user data.
hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameThe name of the object.

Public Functions

SaveAndReimportSave asset importer settings if asset importer is dirty.
SetAssetBundleNameAndVariantSet the AssetBundle name and variant.
GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the game object.

Static Functions

GetAtPathRetrieves the asset importer for the asset at path.
DestroyRemoves a gameobject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateClones the object original and returns the clone.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.

Did you find this page useful? Please give it a rating: