Version: 2017.4
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.

Properties

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.
pixelAspectRatioDenominatorDenominator of the pixel aspect ratio (num:den).
pixelAspectRatioNumeratorNumerator of the pixel aspect ratio (num:den).
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.
transcodeSkippedReturns true if transcoding was skipped during import, false otherwise. (Read Only)When VideoImporterTargetSettings.enableTranscoding is set to true, the resulting transcoding operation done at import time may be quite long, up to many hours depending on source resolution and content duration. An option to skip this process is offered in the asset import progress bar. When skipped, the transcoding instead provides a non-transcoded verision of the asset. However, the importer settings stay intact so this property can be inspected to detect the incoherence with the generated artifact.Re-importing without stopping the transcode process, or with transcode turned off, causes this property to become false.
useLegacyImporterTrue to import a MovieTexture (deprecated), false for a VideoClip (preferred).

Public Methods

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

Properties

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 Methods

AddRemapMap a sub-asset from an imported asset (such as an FBX file) to an external Asset of the same type.
GetExternalObjectMapGets a copy of the external object map used by the AssetImporter.
RemoveRemapRemoves an item from the map of external objects.
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 GameObject.

Static Methods

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.
DontDestroyOnLoadDo not destroy the target Object 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.