Time.time explanation.

Can you explain how to use Time.time, how it work?

Time.time simply gives you a numeric value which is equal to the number of seconds which have elapsed since the project started playing.

The value is a 'float', which means that you get exact time including the fraction of the second which is currently elapsing, rather than discrete whole-number seconds.

Time.time is useful for many purposes, and it's often used when comparing the current time against a time stored in a variable, to check how much time has elapsed since a certain moment, or how much time remains until a certain future moment.

A common mistake is to use Time.time as the 3rd parameter for a 'Lerp' function. When using Lerp, you would usually need to use Time.deltaTime instead.

Time.time never changes during the course of a function, so you cannot use it to profile code that takes place inside a single function. Time.time (and Time.deltaTime) only change their value once per frame.

For more information, see the Time.time manual page, and the Time Class manual page which - if you click on each function or property of the class - has examples of how to use each of these things.