Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Hoc can i check the time passed in the current frame?

Discussion in 'Scripting' started by Nanako, Dec 6, 2014.

  1. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
  2. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    You could have a float defined somewhere in a script on a GameObject that's always active and add Time.deltaTime to it in Update.
     
  3. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    that would just give me the value of Time.time, with pointless overhead. most of the time functoions only update once per frame
     
  4. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Oh I see. I read the linked question and saw you want to check time between operations in 1 frame. That's quite the insignificant amount of time passing :D

    I don't know if it's possible in C#, but my C teacher says for checking things more frequent than 16 milliseconds, you need to learn how clock cycles work and how to measure them in your computer.