当准备创建您未导入的 Asset(例如,.meta 文件)时,Unity 会调用此方法。
using UnityEngine;
public class CustomAssetModificationProcessor : UnityEditor.AssetModificationProcessor { static void OnWillCreateAsset(string assetName) { Debug.Log("OnWillCreateAsset is being called with the following asset: " + assetName + "."); } }