エディタースクリプトからテクスチャインポーターの Texture2D のインポート設定を変更することができます。
Settings of this class cover most of the settings exposed in Texture Import Settings. Some settings require you to use TextureImporterSettings. Refer to TextureImporter.SetTextureSettings).
allowAlphaSplitting | Allows alpha splitting on relevant platforms for this texture. |
alphaIsTransparency | If the alpha channel of your texture represents transparency, enable this property to dilate the color channels of visible texels into fully transparent areas. This effectively adds padding around transparent areas that prevents filtering artifacts from forming on their edges. Unity does not support this property for HDR textures.This property makes the color data of invisible texels undefined. Disable this property to preserve invisible texels' original color data. |
alphaSource | Select how the alpha of the imported texture is generated. |
alphaTestReferenceValue | Returns or assigns the alpha test reference value. |
androidETC2FallbackOverride | ETC2 texture decompression fallback override on Android devices that don't support ETC2. |
anisoLevel | テクスチャの異方性フィルタリングのレベル |
borderMipmap | Keeps texture borders the same when generating mipmaps. |
compressionQuality | The quality of Crunch texture compression. The range is 0 through 100. A higher quality means larger textures and longer compression times. |
convertToNormalmap | Convert heightmap to normal map |
crunchedCompression | Use crunched compression when available. |
fadeout | Fade out mip levels to gray color. |
filterMode | テクスチャのフィルタリングモード |
flipGreenChannel | Indicates whether to invert the green channel values of a normal map. |
generateCubemap | Cubemap を生成モード |
heightmapScale | ハイトマップの bumpyness 量 |
ignoreMipmapLimit | Enable this flag for textures that should ignore mipmap limit settings. |
ignorePngGamma | Ignore the Gamma attribute in PNG files. This property does not effect other file formats. |
isReadable | Whether Unity stores an additional copy of the imported texture's pixel data in CPU-addressable memory. |
maxTextureSize | テクスチャの最大サイズ |
mipMapBias | ミップマップのバイアス |
mipmapEnabled | ミップマップを生成します。 |
mipmapFadeDistanceEnd | テクスチャがフェードアウトを終了する Mipmap レベル |
mipmapFadeDistanceStart | テクスチャがフェードアウトを開始する Mipmap レベル |
mipmapFilter | Mipmap のフィルタリング方法 |
mipmapLimitGroupName | Name of the texture mipmap limit group to which this texture belongs. |
mipMapsPreserveCoverage | Enables or disables coverage-preserving alpha mipmapping. |
normalmapFilter | 法線マップのフィルタリング方法 |
npotScale | 2 のべき乗サイズでないテクスチャのスケーリング方法 |
qualifiesForSpritePacking | もしこの TextureImporter が Sprite Packing のためにセットアップが行われていたら true を返します |
secondarySpriteTextures | Secondary textures for the imported Sprites. |
spriteBorder | 生成されたスプライトのボーダーサイズ |
spriteImportMode | Sprite テクスチャのインポートモードを設定します |
spritePivot | Sprite オブジェクトの座標空間の中心点の位置を設定します |
spritePixelsPerUnit | ワールド空間座標の 1 単位分に相当する、スプライトのピクセル数。 |
sRGBTexture | Whether this texture stores data in sRGB (also called gamma) color space. |
streamingMipmaps | Enable mipmap streaming for this texture. |
streamingMipmapsPriority | Relative priority for this texture when reducing memory size in order to hit the memory budget. |
swizzleA | Specifies the source for the texture's alpha color channel data. |
swizzleB | Specifies the source for the texture's blue color channel data. |
swizzleG | Specifies the source for the texture's green color channel data. |
swizzleR | Specifies the source for the texture's red color channel data. |
textureCompression | Compression of imported texture. |
textureShape | The shape of the imported texture. |
textureType | テクスチャタイプ |
vtOnly | When enabled, this texture can solely be used in combination with a Texture Stack for Virtual Texturing. When enabled the texture is not guaranteed to be available as a Texture2D in the Player (e.g., not accessible from a script). When disabled, the Player includes the texture both as a Texture2D (e.g., accessible from script) and as a streamable texture in a Texture Stack. |
wrapMode | Texture coordinate wrapping mode. |
wrapModeU | Texture U coordinate wrapping mode. |
wrapModeV | Texture V coordinate wrapping mode. |
wrapModeW | Texture W coordinate wrapping mode for Texture3D. |
ClearPlatformTextureSettings | Clears specific target platform settings. |
DoesSourceTextureHaveAlpha | Allows you to check whether the texture source image has an alpha channel. |
GetAutomaticFormat | Returns the TextureImporterFormat that would be automatically chosen for this platform. |
GetDefaultPlatformTextureSettings | Gets the default platform specific texture settings. |
GetPlatformTextureSettings | Gets platform specific texture settings. |
GetSourceTextureWidthAndHeight | Gets the source texture's width and height. |
ReadTextureImportInstructions | この TextureImporter のアクティブなテクスチャの情報を読み込みます |
ReadTextureSettings | TextureImporterSettings からテクスチャ設定情報を読み込みます |
SetPlatformTextureSettings | Sets specific target platform settings. |
SetTextureSettings | Sets texture importers settings from TextureImporterSettings class. |
IsDefaultPlatformTextureFormatValid | Validates TextureImporterFormat based on the type of the current format (TextureImporterType) and the default platform. |
IsPlatformTextureFormatValid | Validates TextureImporterFormat based on a specified import type (TextureImporterType) and a specified build target (BuildTarget.). |
assetBundleName | アセットバンドルの名前の取得や設定ができます。 |
assetBundleVariant | アセットバンドルバリアントの取得や設定ができます。 |
assetPath | アセットのパス(読み取り専用) |
importSettingsMissing | The value is true when no meta file is provided with the imported asset. |
userData | ユーザーが自由に設定/取得できる文字列 |
hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
name | オブジェクト名 |
AddRemap | Map a sub-asset from an imported asset (such as an FBX file) to an external Asset of the same type. |
GetExternalObjectMap | Gets a copy of the external object map used by the AssetImporter. |
RemoveRemap | Removes an item from the map of external objects. |
SaveAndReimport | アセットインポーターがダーティであれば、アセットインポーターの設定を保存します。 |
SetAssetBundleNameAndVariant | アセットバンドル名とアセットバンドルバリアントを設定します。 |
SupportsRemappedAssetType | Checks if the AssetImporter supports remapping the given asset type. |
GetInstanceID | Gets the instance ID of the object. |
ToString | Returns the name of the object. |
GetAtPath | アセットのパスから AssetImporter を取得します |
GetImportLog | Retrieves logs generated during the import of the asset at path. |
Destroy | Removes a GameObject, component or asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Do not destroy the target Object when loading a new Scene. |
FindAnyObjectByType | Retrieves any active loaded object of Type type. |
FindFirstObjectByType | Retrieves the first active loaded object of Type type. |
FindObjectsByType | Retrieves a list of all loaded objects of Type type. |
Instantiate | original のオブジェクトをクローンします |
bool | オブジェクトが存在するかどうか |
operator != | 二つのオブジェクトが異なるオブジェクトを参照しているか比較します |
operator == | 2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.