Search Unity

_Time = Time.time or Time.timeSinceLevelLoad?

Discussion in 'General Graphics' started by laurentlavigne, Jul 29, 2020.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    doc's mum on that
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    _Time.y == Time.timeSinceLevelLoad *

    * except when it's not, as sometimes it's a frame off, or some completely different time that no one really knows where it's coming from.
     
    laurentlavigne likes this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    thanks, I knew Unity was non deterministic but this is a new league.
    Frame off I can live with, non earth time will piss people off so I'll just inject _Time with SetGlobalFloat
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    Unity will stomp on it, you'll need to use a custom uniform.