Experimental: this API is experimental and might be changed or removed in the future.

AssetImportContext

class in UnityEditor.Experimental.AssetImporters

Switch to Manual

Description

在导入事件期间定义脚本化导入器的导入上下文。

此类包含 OnImportAsset() 任务的输入和输出信息。

Variables

assetPath要导入的源资源文件的路径。
mainObjectThe main object set on the AssetImportContext.
selectedBuildTargetThis indicates what platform the import event is targeting.

Public Functions

AddObjectToAsset向导入操作的结果添加对象。
DependsOnSourceAssetCreates dependency between the asset and a source asset.
GetObjectsGets the list of objects set on the AssetImportContext.
LogImportErrorLogs an error message encountered during import.
LogImportWarningLogs a warning message encountered during import.
SetMainObject设置导入的主要对象。