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

AssetImporterEditor.OnEnable

切换到手册
public void OnEnable ();

描述

当对象加载时调用此函数。

using UnityEngine;
using UnityEditor;
using UnityEditor.Experimental.AssetImporters;

public class ExampleScript : AssetImporterEditor { public override void OnEnable() { base.OnEnable(); Debug.Log("editor was enabled"); } }

OnEnable 不能作为协程。