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

ScriptedImporterAttribute.version

切换到手册
public int version ;

描述

导入器版本号,导入层用它来检测导入器新版本,并在发生此类事件时触发重新导入,从而应用对脚本化导入器的最新更改。

using UnityEngine;
using UnityEditor.Experimental.AssetImporters;

[ScriptedImporter(1, "sphere")] public class SphereImporter : ScriptedImporter { public override void OnImportAsset(AssetImportContext ctx) { // ... } }