Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

TypeScriptError: Property 'Time' does not exist on type 'typeof ut'.

Discussion in 'Project Tiny' started by Rhiojin, May 7, 2019.

  1. Rhiojin

    Rhiojin

    Joined:
    Dec 12, 2012
    Posts:
    8
    Following the tutorial series by mike im simply trying to get some delta time.
    but i get the error above.
    What am i missing? Screenshot 2019-05-07 09.48.09.png
     
  2. Zionisias

    Zionisias

    Joined:
    Apr 23, 2019
    Posts:
    40
    I'm not sure about ut.Time.deltaTime() being a thing, but I use this.scheduler.deltaTime() and it seems to work as expected.
     
    Rhiojin and reallyhexln like this.
  3. Rupture13

    Rupture13

    Joined:
    Apr 12, 2016
    Posts:
    131
    The Time class he's using in the tutorial is not standard in Tiny. It's a custom made class but they made it in the "ut" namespace, so it looks like it's default. Don't be tricked by that ;]

    You can either make your own Time class (and put it in the "ut" namespace if you really want), or just use the deltaTime from the Scheduler class, as suggested above.
     
    Rhiojin and Zionisias like this.
  4. Rhiojin

    Rhiojin

    Joined:
    Dec 12, 2012
    Posts:
    8
    Thats the most misleading thing ive seen in ages .....
    In anycase thanks. Seems to work now.