Show / Hide Table of Contents

Class TextureImporter

Inheritance
Object
Object
AssetImporter
TextureImporter
Implements
ISpriteEditorDataProvider
Inherited Members
AssetImporter.assetPath
AssetImporter.importSettingsMissing
AssetImporter.assetTimeStamp
AssetImporter.userData
AssetImporter.assetBundleName
AssetImporter.assetBundleVariant
AssetImporter.SetAssetBundleNameAndVariant(String, String)
AssetImporter.GetAtPath(String)
AssetImporter.SaveAndReimport()
AssetImporter.AddRemap(AssetImporter.SourceAssetIdentifier, Object)
AssetImporter.RemoveRemap(AssetImporter.SourceAssetIdentifier)
AssetImporter.GetExternalObjectMap()
Object.GetInstanceID()
Object.GetHashCode()
Object.Equals(Object)
Object.name
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate(Object, Transform, Boolean)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Instantiate<T>(T, Transform, Boolean)
Object.Destroy(Object, Single)
Object.Destroy(Object)
Object.DestroyImmediate(Object, Boolean)
Object.DestroyImmediate(Object)
Object.FindObjectsOfType(Type)
Object.DontDestroyOnLoad(Object)
Object.hideFlags
Object.DestroyObject(Object, Single)
Object.DestroyObject(Object)
Object.FindSceneObjectsOfType(Type)
Object.FindObjectsOfTypeIncludingAssets(Type)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.FindObjectsOfTypeAll(Type)
Object.FindObjectOfType(Type)
Object.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEditor
Assembly: UnityEditor.dll
Syntax
public sealed class TextureImporter : AssetImporter, ISpriteEditorDataProvider

Properties

allowAlphaSplitting

Declaration
public bool allowAlphaSplitting { get; set; }
Property Value
Type Description
Boolean

alphaIsTransparency

Declaration
public bool alphaIsTransparency { get; set; }
Property Value
Type Description
Boolean

alphaSource

Declaration
public TextureImporterAlphaSource alphaSource { get; set; }
Property Value
Type Description
TextureImporterAlphaSource

alphaTestReferenceValue

Declaration
public float alphaTestReferenceValue { get; set; }
Property Value
Type Description
Single

androidETC2FallbackOverride

Declaration
public AndroidETC2FallbackOverride androidETC2FallbackOverride { get; set; }
Property Value
Type Description
AndroidETC2FallbackOverride

anisoLevel

Declaration
public int anisoLevel { get; set; }
Property Value
Type Description
Int32

borderMipmap

Declaration
public bool borderMipmap { get; set; }
Property Value
Type Description
Boolean

compressionQuality

Declaration
public int compressionQuality { get; set; }
Property Value
Type Description
Int32

convertToNormalmap

Declaration
public bool convertToNormalmap { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

correctGamma

Declaration
[Obsolete("correctGamma Property deprecated. Mipmaps are always generated in linear space.")]
public bool correctGamma { get; set; }
Property Value
Type Description
Boolean

crunchedCompression

Declaration
public bool crunchedCompression { get; set; }
Property Value
Type Description
Boolean

fadeout

Declaration
public bool fadeout { get; set; }
Property Value
Type Description
Boolean

filterMode

Declaration
public FilterMode filterMode { get; set; }
Property Value
Type Description
FilterMode

generateCubemap

Declaration
public TextureImporterGenerateCubemap generateCubemap { get; set; }
Property Value
Type Description
TextureImporterGenerateCubemap
| Improve this Doc View Source

generateMipsInLinearSpace

Declaration
[Obsolete("generateMipsInLinearSpace Property deprecated. Mipmaps are always generated in linear space.")]
public bool generateMipsInLinearSpace { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

grayscaleToAlpha

Declaration
[Obsolete("Use UnityEditor.TextureImporter.alphaSource instead.")]
public bool grayscaleToAlpha { get; set; }
Property Value
Type Description
Boolean

heightmapScale

Declaration
public float heightmapScale { get; set; }
Property Value
Type Description
Single

isReadable

Declaration
public bool isReadable { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

lightmap

Declaration
[Obsolete("lightmap Property deprecated. Check [[TextureImporterSettings.textureType]] instead. Getter will work as expected. Setter will set textureType to Lightmap if true, nothing otherwise.")]
public bool lightmap { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

linearTexture

Declaration
[Obsolete("linearTexture Property deprecated. Use sRGBTexture instead.")]
public bool linearTexture { get; set; }
Property Value
Type Description
Boolean

maxTextureSize

Declaration
public int maxTextureSize { get; set; }
Property Value
Type Description
Int32

mipMapBias

Declaration
public float mipMapBias { get; set; }
Property Value
Type Description
Single

mipmapEnabled

Declaration
public bool mipmapEnabled { get; set; }
Property Value
Type Description
Boolean

mipmapFadeDistanceEnd

Declaration
public int mipmapFadeDistanceEnd { get; set; }
Property Value
Type Description
Int32

mipmapFadeDistanceStart

Declaration
public int mipmapFadeDistanceStart { get; set; }
Property Value
Type Description
Int32

mipmapFilter

Declaration
public TextureImporterMipFilter mipmapFilter { get; set; }
Property Value
Type Description
TextureImporterMipFilter

mipMapsPreserveCoverage

Declaration
public bool mipMapsPreserveCoverage { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

normalmap

Declaration
[Obsolete("normalmap Property deprecated. Check [[TextureImporterSettings.textureType]] instead. Getter will work as expected. Setter will set textureType to NormalMap if true, nothing otherwise.")]
public bool normalmap { get; set; }
Property Value
Type Description
Boolean

normalmapFilter

Declaration
public TextureImporterNormalFilter normalmapFilter { get; set; }
Property Value
Type Description
TextureImporterNormalFilter

npotScale

Declaration
public TextureImporterNPOTScale npotScale { get; set; }
Property Value
Type Description
TextureImporterNPOTScale

qualifiesForSpritePacking

Declaration
public bool qualifiesForSpritePacking { get; }
Property Value
Type Description
Boolean

spriteBorder

Declaration
public Vector4 spriteBorder { get; set; }
Property Value
Type Description
Vector4

spriteImportMode

Declaration
public SpriteImportMode spriteImportMode { get; set; }
Property Value
Type Description
SpriteImportMode

spritePackingTag

Declaration
public string spritePackingTag { get; set; }
Property Value
Type Description
String

spritePivot

Declaration
public Vector2 spritePivot { get; set; }
Property Value
Type Description
Vector2

spritePixelsPerUnit

Declaration
public float spritePixelsPerUnit { get; set; }
Property Value
Type Description
Single

spritePixelsToUnits

Declaration
[Obsolete("Use spritePixelsPerUnit property instead.")]
public float spritePixelsToUnits { get; set; }
Property Value
Type Description
Single

spritesheet

Declaration
public SpriteMetaData[] spritesheet { get; set; }
Property Value
Type Description
SpriteMetaData[]

sRGBTexture

Declaration
public bool sRGBTexture { get; set; }
Property Value
Type Description
Boolean

streamingMipmaps

Declaration
public bool streamingMipmaps { get; set; }
Property Value
Type Description
Boolean

streamingMipmapsPriority

Declaration
public int streamingMipmapsPriority { get; set; }
Property Value
Type Description
Int32

textureCompression

Declaration
public TextureImporterCompression textureCompression { get; set; }
Property Value
Type Description
TextureImporterCompression

textureFormat

Declaration
[Obsolete("textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.")]
public TextureImporterFormat textureFormat { get; set; }
Property Value
Type Description
TextureImporterFormat

textureShape

Declaration
public TextureImporterShape textureShape { get; set; }
Property Value
Type Description
TextureImporterShape

textureType

Declaration
public TextureImporterType textureType { get; set; }
Property Value
Type Description
TextureImporterType

wrapMode

Declaration
public TextureWrapMode wrapMode { get; set; }
Property Value
Type Description
TextureWrapMode

wrapModeU

Declaration
public TextureWrapMode wrapModeU { get; set; }
Property Value
Type Description
TextureWrapMode

wrapModeV

Declaration
public TextureWrapMode wrapModeV { get; set; }
Property Value
Type Description
TextureWrapMode

wrapModeW

Declaration
public TextureWrapMode wrapModeW { get; set; }
Property Value
Type Description
TextureWrapMode

Methods

| Improve this Doc View Source

ClearPlatformTextureSettings(String)

Declaration
public void ClearPlatformTextureSettings(string platform)
Parameters
Type Name Description
String platform
| Improve this Doc View Source

DoesSourceTextureHaveAlpha()

Declaration
public bool DoesSourceTextureHaveAlpha()
Returns
Type Description
Boolean
| Improve this Doc View Source

DoesSourceTextureHaveColor()

Declaration
[Obsolete("DoesSourceTextureHaveColor always returns true in Unity.")]
public bool DoesSourceTextureHaveColor()
Returns
Type Description
Boolean

GetAllowsAlphaSplitting()

Declaration
[Obsolete("Use UnityEditor.TextureImporter.GetPlatformTextureSettings() instead.")]
public bool GetAllowsAlphaSplitting()
Returns
Type Description
Boolean
| Improve this Doc View Source

GetAutomaticFormat(String)

Declaration
public TextureImporterFormat GetAutomaticFormat(string platform)
Parameters
Type Name Description
String platform
Returns
Type Description
TextureImporterFormat
| Improve this Doc View Source

GetDefaultPlatformTextureSettings()

Declaration
public TextureImporterPlatformSettings GetDefaultPlatformTextureSettings()
Returns
Type Description
TextureImporterPlatformSettings
| Improve this Doc View Source

GetPlatformTextureSettings(String)

Declaration
public TextureImporterPlatformSettings GetPlatformTextureSettings(string platform)
Parameters
Type Name Description
String platform
Returns
Type Description
TextureImporterPlatformSettings
| Improve this Doc View Source

GetPlatformTextureSettings(String, out Int32, out TextureImporterFormat)

Declaration
public bool GetPlatformTextureSettings(string platform, out int maxTextureSize, out TextureImporterFormat textureFormat)
Parameters
Type Name Description
String platform
Int32 maxTextureSize
TextureImporterFormat textureFormat
Returns
Type Description
Boolean
| Improve this Doc View Source

GetPlatformTextureSettings(String, out Int32, out TextureImporterFormat, out Int32)

Declaration
public bool GetPlatformTextureSettings(string platform, out int maxTextureSize, out TextureImporterFormat textureFormat, out int compressionQuality)
Parameters
Type Name Description
String platform
Int32 maxTextureSize
TextureImporterFormat textureFormat
Int32 compressionQuality
Returns
Type Description
Boolean
| Improve this Doc View Source

GetPlatformTextureSettings(String, out Int32, out TextureImporterFormat, out Int32, out Boolean)

Declaration
public bool GetPlatformTextureSettings(string platform, out int maxTextureSize, out TextureImporterFormat textureFormat, out int compressionQuality, out bool etc1AlphaSplitEnabled)
Parameters
Type Name Description
String platform
Int32 maxTextureSize
TextureImporterFormat textureFormat
Int32 compressionQuality
Boolean etc1AlphaSplitEnabled
Returns
Type Description
Boolean

ReadTextureImportInstructions(BuildTarget, out TextureFormat, out ColorSpace, out Int32)

Declaration
public void ReadTextureImportInstructions(BuildTarget target, out TextureFormat desiredFormat, out ColorSpace colorSpace, out int compressionQuality)
Parameters
Type Name Description
BuildTarget target
TextureFormat desiredFormat
ColorSpace colorSpace
Int32 compressionQuality
| Improve this Doc View Source

ReadTextureSettings(TextureImporterSettings)

Declaration
public void ReadTextureSettings(TextureImporterSettings dest)
Parameters
Type Name Description
TextureImporterSettings dest

SetAllowsAlphaSplitting(Boolean)

Declaration
[Obsolete("Use UnityEditor.TextureImporter.SetPlatformTextureSettings() instead.")]
public void SetAllowsAlphaSplitting(bool flag)
Parameters
Type Name Description
Boolean flag
| Improve this Doc View Source

SetPlatformTextureSettings(String, Int32, TextureImporterFormat)

Declaration
[Obsolete("Use UnityEditor.TextureImporter.SetPlatformTextureSettings(TextureImporterPlatformSettings) instead.")]
public void SetPlatformTextureSettings(string platform, int maxTextureSize, TextureImporterFormat textureFormat)
Parameters
Type Name Description
String platform
Int32 maxTextureSize
TextureImporterFormat textureFormat
| Improve this Doc View Source

SetPlatformTextureSettings(String, Int32, TextureImporterFormat, Boolean)

Declaration
[Obsolete("Use UnityEditor.TextureImporter.SetPlatformTextureSettings(TextureImporterPlatformSettings) instead.")]
public void SetPlatformTextureSettings(string platform, int maxTextureSize, TextureImporterFormat textureFormat, bool allowsAlphaSplit)
Parameters
Type Name Description
String platform
Int32 maxTextureSize
TextureImporterFormat textureFormat
Boolean allowsAlphaSplit
| Improve this Doc View Source

SetPlatformTextureSettings(String, Int32, TextureImporterFormat, Int32, Boolean)

Declaration
[Obsolete("Use UnityEditor.TextureImporter.SetPlatformTextureSettings(TextureImporterPlatformSettings) instead.")]
public void SetPlatformTextureSettings(string platform, int maxTextureSize, TextureImporterFormat textureFormat, int compressionQuality, bool allowsAlphaSplit)
Parameters
Type Name Description
String platform
Int32 maxTextureSize
TextureImporterFormat textureFormat
Int32 compressionQuality
Boolean allowsAlphaSplit
| Improve this Doc View Source

SetPlatformTextureSettings(TextureImporterPlatformSettings)

Declaration
public void SetPlatformTextureSettings(TextureImporterPlatformSettings platformSettings)
Parameters
Type Name Description
TextureImporterPlatformSettings platformSettings
| Improve this Doc View Source

SetTextureSettings(TextureImporterSettings)

Declaration
public void SetTextureSettings(TextureImporterSettings src)
Parameters
Type Name Description
TextureImporterSettings src

Explicit Interface Implementations

| Improve this Doc View Source

ISpriteEditorDataProvider.Apply()

Declaration
void ISpriteEditorDataProvider.Apply()
| Improve this Doc View Source

ISpriteEditorDataProvider.GetDataProvider<T>()

Declaration
T ISpriteEditorDataProvider.GetDataProvider<T>()
    where T : class
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

ISpriteEditorDataProvider.GetSpriteRects()

Declaration
SpriteRect[] ISpriteEditorDataProvider.GetSpriteRects()
Returns
Type Description
SpriteRect[]
| Improve this Doc View Source

ISpriteEditorDataProvider.HasDataProvider(Type)

Declaration
bool ISpriteEditorDataProvider.HasDataProvider(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
Boolean
| Improve this Doc View Source

ISpriteEditorDataProvider.InitSpriteEditorDataProvider()

Declaration
void ISpriteEditorDataProvider.InitSpriteEditorDataProvider()
| Improve this Doc View Source

ISpriteEditorDataProvider.pixelsPerUnit

Declaration
float ISpriteEditorDataProvider.pixelsPerUnit { get; }
Returns
Type Description
Single
| Improve this Doc View Source

ISpriteEditorDataProvider.SetSpriteRects(SpriteRect[])

Declaration
void ISpriteEditorDataProvider.SetSpriteRects(SpriteRect[] spriteRects)
Parameters
Type Name Description
SpriteRect[] spriteRects
| Improve this Doc View Source

ISpriteEditorDataProvider.targetObject

Declaration
Object ISpriteEditorDataProvider.targetObject { get; }
Returns
Type Description
Object

Implements

ISpriteEditorDataProvider

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX