SubstanceImporter

class in UnityEditor

/

继承自:AssetImporter

切换到手册

描述

The SubstanceImporter class lets you access the imported ProceduralMaterial instances.

公共函数

CloneMaterialClone an existing ProceduralMaterial instance.
DestroyMaterialDestroy an existing ProceduralMaterial instance.
ExportBitmapsExport the bitmaps generated by a ProceduralMaterial as TGA files.
ExportPresetExport a XML preset string with the value of all parameters of a given ProceduralMaterial to the specified folder.
GetAnimationUpdateRateGet the ProceduralMaterial animation update rate in millisecond.
GetGenerateAllOutputsCheck if the ProceduralMaterial needs to force generation of all its outputs.
GetGenerateMipMapsReturn true if the mipmaps are generated for this ProceduralMaterial.
GetMaterialCountGet the number of ProceduralMaterial instances.
GetMaterialOffsetGet the material offset, which is used for all the textures that are part of this ProceduralMaterial.
GetMaterialsGet an array with the ProceduralMaterial instances.
GetMaterialScaleGet the material scale, which is used for all the textures that are part of this ProceduralMaterial.
GetPlatformTextureSettingsGet the import settings for a given ProceduralMaterial for a given platform (width and height, RAW/Compressed format, loading behavior).
GetPrototypeNamesGet a list of the names of the ProceduralMaterial prototypes in the package.
GetTextureAlphaSourceGet the alpha source of the given texture in the ProceduralMaterial.
InstantiateMaterialInstantiate a new ProceduralMaterial instance from a prototype.
OnShaderModifiedAfter modifying the shader of a ProceduralMaterial, call this function to apply the changes to the importer.
RenameMaterialRename an existing ProceduralMaterial instance.
ResetMaterialReset the ProceduralMaterial to its default values.
SetAnimationUpdateRateSet the ProceduralMaterial animation update rate in millisecond.
SetGenerateAllOutputsSpecify if the ProceduralMaterial needs to force generation of all its outputs.
SetGenerateMipMapsForce the generation of mipmaps for this ProceduralMaterial.
SetMaterialOffsetSet the material offset, which is used for all the textures that are part of this ProceduralMaterial.
SetMaterialScaleSet the material scale, which is used for all the textures that are part of this ProceduralMaterial.
SetPlatformTextureSettingsSet the import settings for the input ProceduralMaterial for the input platform.
SetTextureAlphaSourceSet the alpha source of the given texture in the ProceduralMaterial.

继承的成员

变量

assetBundleName获取或设置 AssetBundle 名称。
assetBundleVariant获取或设置 AssetBundle 变体。
assetPath此导入器的资源的路径名称。(只读)
userData获取或设置任意用户数据。

公共函数

AddRemap将子资源从导入的资源(例如 FBX 文件)映射到同类型的外部资源。
GetExternalObjectMap获取 AssetImporter 使用的外部对象映射的副本。
RemoveRemap从外部对象的映射中删除项。
SaveAndReimport如果资源导入器已标记为“脏”,则保存资源导入器设置。
SetAssetBundleNameAndVariant设置 AssetBundle 名称和变体。

静态函数

GetAtPath在 path 处检索资源的资源导入器。