Version: 2017.2

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获取或设置任意用户数据。
hideFlags该对象应该隐藏、随场景一起保存还是由用户修改?
name对象的名称。

公共函数

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

静态函数

GetAtPath在 path 处检索资源的资源导入器。
Destroy删除 GameObject、组件或资源。
DestroyImmediate立即销毁对象 /obj/。强烈建议您改用 Destroy。
DontDestroyOnLoad加载新场景时,不自动销毁对象 /target/。
FindObjectOfType返回第一个类型为 type 的已加载的激活对象。
FindObjectsOfType返回所有类型为 type 的已加载的激活对象的列表。
Instantiate克隆 original 对象并返回克隆对象。

运算符

bool该对象是否存在?
operator !=比较两个对象是否引用不同的对象。
operator ==比较两个对象引用,判断它们是否引用同一个对象。