Search Unity

coroutine execution order

Discussion in 'Scripting' started by llavigne, Apr 6, 2008.

  1. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
    In a LateUpdate() a coroutine is being called.
    Will the first instruction of that coroutine be executed before the frame is rendered?
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Coroutines don't use threads or anything; you never have routines being interrupted (leaving aside the use of yield). So all of it will be executed before rendering, unless you're using yield.

    --Eric