示例#1
0
 /// <summary>
 /// Avoids stacking up queues by waiting for the async path probe. Game updates almost
 /// all Sim and Render handlers (including BrainScheduler) in a LateUpdate call
 /// (not Update, KLEI PLEASE), so we let it spill over into the next frame and just
 /// hold up the next LateUpdate with a regular Update.
 /// </summary>
 public void Update()
 {
     if (jobManager != null)
     {
         if (debug)
         {
             var now = Stopwatch.StartNew();
             jobManager.Wait();
             DebugMetrics.LogPathProbe(now.ElapsedTicks, jobManager.LastRunTime);
         }
         else
         {
             jobManager.Wait();
         }
     }
 }