Here is my question: in the Start Awake OnEnable coroutines running test Start
Private void Awake ()
{
//StartCoroutine (" tt ");
}
Private void OnEnable ()
{
//StartCoroutine (" tt ");
}
Private void the Start ()
{
StartCoroutine (" tt ");
}
Private int a=0;
Void the Update ()
{
Print (" Update ");
}
IEnumerator (tt)
{
Print (" IEnumerator ");
Yield return null;
Print (" tt ");
}
The result is:
Coroutines in the Start is performed after two Update, conform to the unity of official explanation
Awake/coroutines Onenable is performed after an Update, this is very strange, isn't it should be the next frame to perform, and how the frame is carried out
CodePudding user response:
The top!

CodePudding user response:
May be Awake/Onenable and Update time between frames, waiting for coroutines in that frame,CodePudding user response:
Wan chun
CodePudding user response:
There are bosses to explainCodePudding user response: