Class TextureImporter
Inheritance
TextureImporter
Assembly: UnityEditor.dll
Syntax
public sealed class TextureImporter : AssetImporter, ISpriteEditorDataProvider
Properties
allowAlphaSplitting
Declaration
public bool allowAlphaSplitting { get; set; }
Property Value
alphaIsTransparency
Declaration
public bool alphaIsTransparency { get; set; }
Property Value
alphaSource
Declaration
public TextureImporterAlphaSource alphaSource { get; set; }
Property Value
alphaTestReferenceValue
Declaration
public float alphaTestReferenceValue { get; set; }
Property Value
androidETC2FallbackOverride
Declaration
public AndroidETC2FallbackOverride androidETC2FallbackOverride { get; set; }
Property Value
anisoLevel
Declaration
public int anisoLevel { get; set; }
Property Value
borderMipmap
Declaration
public bool borderMipmap { get; set; }
Property Value
compressionQuality
Declaration
public int compressionQuality { get; set; }
Property Value
convertToNormalmap
Declaration
public bool convertToNormalmap { get; set; }
Property Value
|
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
crunchedCompression
Declaration
public bool crunchedCompression { get; set; }
Property Value
fadeout
Declaration
public bool fadeout { get; set; }
Property Value
filterMode
Declaration
public FilterMode filterMode { get; set; }
Property Value
generateCubemap
Declaration
public TextureImporterGenerateCubemap generateCubemap { get; set; }
Property Value
|
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
|
Improve this Doc
View Source
grayscaleToAlpha
Declaration
[Obsolete("Use UnityEditor.TextureImporter.alphaSource instead.")]
public bool grayscaleToAlpha { get; set; }
Property Value
heightmapScale
Declaration
public float heightmapScale { get; set; }
Property Value
isReadable
Declaration
public bool isReadable { get; set; }
Property Value
|
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
|
Improve this Doc
View Source
linearTexture
Declaration
[Obsolete("linearTexture Property deprecated. Use sRGBTexture instead.")]
public bool linearTexture { get; set; }
Property Value
maxTextureSize
Declaration
public int maxTextureSize { get; set; }
Property Value
mipMapBias
Declaration
public float mipMapBias { get; set; }
Property Value
mipmapEnabled
Declaration
public bool mipmapEnabled { get; set; }
Property Value
mipmapFadeDistanceEnd
Declaration
public int mipmapFadeDistanceEnd { get; set; }
Property Value
mipmapFadeDistanceStart
Declaration
public int mipmapFadeDistanceStart { get; set; }
Property Value
mipmapFilter
Declaration
public TextureImporterMipFilter mipmapFilter { get; set; }
Property Value
mipMapsPreserveCoverage
Declaration
public bool mipMapsPreserveCoverage { get; set; }
Property Value
|
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
normalmapFilter
Declaration
public TextureImporterNormalFilter normalmapFilter { get; set; }
Property Value
npotScale
Declaration
public TextureImporterNPOTScale npotScale { get; set; }
Property Value
qualifiesForSpritePacking
Declaration
public bool qualifiesForSpritePacking { get; }
Property Value
spriteBorder
Declaration
public Vector4 spriteBorder { get; set; }
Property Value
spriteImportMode
Declaration
public SpriteImportMode spriteImportMode { get; set; }
Property Value
spritePackingTag
Declaration
public string spritePackingTag { get; set; }
Property Value
spritePivot
Declaration
public Vector2 spritePivot { get; set; }
Property Value
spritePixelsPerUnit
Declaration
public float spritePixelsPerUnit { get; set; }
Property Value
spritePixelsToUnits
Declaration
[Obsolete("Use spritePixelsPerUnit property instead.")]
public float spritePixelsToUnits { get; set; }
Property Value
spritesheet
Declaration
public SpriteMetaData[] spritesheet { get; set; }
Property Value
sRGBTexture
Declaration
public bool sRGBTexture { get; set; }
Property Value
streamingMipmaps
Declaration
public bool streamingMipmaps { get; set; }
Property Value
streamingMipmapsPriority
Declaration
public int streamingMipmapsPriority { get; set; }
Property Value
textureCompression
Declaration
public TextureImporterCompression textureCompression { get; set; }
Property Value
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
textureShape
Declaration
public TextureImporterShape textureShape { get; set; }
Property Value
textureType
Declaration
public TextureImporterType textureType { get; set; }
Property Value
wrapMode
Declaration
public TextureWrapMode wrapMode { get; set; }
Property Value
wrapModeU
Declaration
public TextureWrapMode wrapModeU { get; set; }
Property Value
wrapModeV
Declaration
public TextureWrapMode wrapModeV { get; set; }
Property Value
wrapModeW
Declaration
public TextureWrapMode wrapModeW { get; set; }
Property Value
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
|
Improve this Doc
View Source
DoesSourceTextureHaveColor()
Declaration
[Obsolete("DoesSourceTextureHaveColor always returns true in Unity.")]
public bool DoesSourceTextureHaveColor()
Returns
GetAllowsAlphaSplitting()
Declaration
[Obsolete("Use UnityEditor.TextureImporter.GetPlatformTextureSettings() instead.")]
public bool GetAllowsAlphaSplitting()
Returns
|
Improve this Doc
View Source
GetAutomaticFormat(String)
Declaration
public TextureImporterFormat GetAutomaticFormat(string platform)
Parameters
Type |
Name |
Description |
String |
platform |
|
Returns
|
Improve this Doc
View Source
GetDefaultPlatformTextureSettings()
Declaration
public TextureImporterPlatformSettings GetDefaultPlatformTextureSettings()
Returns
|
Improve this Doc
View Source
GetPlatformTextureSettings(String)
Declaration
public TextureImporterPlatformSettings GetPlatformTextureSettings(string platform)
Parameters
Type |
Name |
Description |
String |
platform |
|
Returns
|
Improve this Doc
View Source
GetPlatformTextureSettings(String, out Int32, out TextureImporterFormat)
Declaration
public bool GetPlatformTextureSettings(string platform, out int maxTextureSize, out TextureImporterFormat textureFormat)
Parameters
Returns
|
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
Returns
|
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
Returns
ReadTextureImportInstructions(BuildTarget, out TextureFormat, out ColorSpace, out Int32)
Declaration
public void ReadTextureImportInstructions(BuildTarget target, out TextureFormat desiredFormat, out ColorSpace colorSpace, out int compressionQuality)
Parameters
|
Improve this Doc
View Source
ReadTextureSettings(TextureImporterSettings)
Declaration
public void ReadTextureSettings(TextureImporterSettings dest)
Parameters
SetAllowsAlphaSplitting(Boolean)
Declaration
[Obsolete("Use UnityEditor.TextureImporter.SetPlatformTextureSettings() instead.")]
public void SetAllowsAlphaSplitting(bool flag)
Parameters
|
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
|
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
|
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
|
Improve this Doc
View Source
SetPlatformTextureSettings(TextureImporterPlatformSettings)
Declaration
public void SetPlatformTextureSettings(TextureImporterPlatformSettings platformSettings)
Parameters
|
Improve this Doc
View Source
SetTextureSettings(TextureImporterSettings)
Declaration
public void SetTextureSettings(TextureImporterSettings src)
Parameters
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 Parameters
|
Improve this Doc
View Source
ISpriteEditorDataProvider.GetSpriteRects()
Declaration
SpriteRect[] ISpriteEditorDataProvider.GetSpriteRects()
Returns
|
Improve this Doc
View Source
ISpriteEditorDataProvider.HasDataProvider(Type)
Declaration
bool ISpriteEditorDataProvider.HasDataProvider(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
|
Improve this Doc
View Source
ISpriteEditorDataProvider.InitSpriteEditorDataProvider()
Declaration
void ISpriteEditorDataProvider.InitSpriteEditorDataProvider()
|
Improve this Doc
View Source
ISpriteEditorDataProvider.pixelsPerUnit
Declaration
float ISpriteEditorDataProvider.pixelsPerUnit { get; }
Returns
|
Improve this Doc
View Source
ISpriteEditorDataProvider.SetSpriteRects(SpriteRect[])
Declaration
void ISpriteEditorDataProvider.SetSpriteRects(SpriteRect[] spriteRects)
Parameters
|
Improve this Doc
View Source
ISpriteEditorDataProvider.targetObject
Declaration
Object ISpriteEditorDataProvider.targetObject { get; }
Returns
Implements
Extension Methods