Version: 2021.3
public int version ;

描述

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

using UnityEngine;
using UnityEditor.AssetImporters;

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