- Home /
 
 
               Question by 
               DmanZH · Feb 01 at 09:46 AM · 
                timertime.deltatimetimescale  
              
 
              Time.deltaTime returns smaller values than actual time between frames
When this code is executed, Time.deltaTime returns a time that is less than Time.unscaledDeltaTime. This only happens in one project, in these variables are the same. And it happens on different PCs. I output timeScale, and it always stays 1. What can affect this behavior? How to fix it?
 void Update ()
 {
     Debug.LogError(Time.timeScale);
     if( start )
     {
         start = false;
         testBool = testBool2 = testBool4 = testBool3 =  true;
     }
     if( testBool )
     {
         time += Time.deltaTime;
         if( time>=10 ) testBool = false;
     }
     if( testBool2 )
     {
         time2 += Time.unscaledDeltaTime;
         if( time2>=10 ) testBool2 = false;
     }
 }
 
               
 
 
                 
                снимок-экрана-2022-01-31-160932.png 
                (2.4 kB) 
               
 
              
               Comment
              
 
               
              Your answer