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

AssetImporterEditor.Awake

切换到手册
protected void Awake ();

描述

当编辑器脚本启动时调用此函数。

在 AssetImporterEditor 脚本启动时调用 Awake。这发生在编辑器启动时,与 MonoBehaviour.Awake 类似。

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

public class ExampleScript : AssetImporterEditor { protected override void Awake() { base.Awake(); Debug.Log("Awake"); } }

OnDisable 不能作为协程。