Versions with this page:
Versions without this page:
当对象加载时调用此函数。
using UnityEngine; using UnityEditor; using UnityEditor.Experimental.AssetImporters;public class ExampleScript : MonoBehaviour { public override void OnEnable() { base.OnEnable(); print("editor was enabled"); } }
OnEnable 不能作为协程。