Versions with this page:
Versions without this page:
当对象加载时调用此函数。
using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void OnEnable() { print("script was enabled"); } }
OnEnable 不能作为协程。