Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Can't import modules in Tiny Mode Typescript

Discussion in 'Project Tiny' started by jayfriso, Aug 13, 2019.

  1. jayfriso


    Oct 24, 2016
    Hi I have a question about importing modules in Tiny Mode Typescript.
    So I have a class with a bunch of helper functions that I use a lot in other scripts.
    Code (JavaScript):
    1. namespace game.utilities {
    3.     /** New System */
    4.     export class JMathService {
    5.         static lerp(a:number, b: number, t: number) : number {
    6.             if (t < 0) {
    The thing I'm trying to achieve is a shorter way to reference this class. Currently I can reference it by doing :

    return game.utilities.JMathService.lerp(

    but I'd rather do

    return JMathService.lerp(

    So i used the import statement to try to do this but this happens :

    Is there anyway to achieve this import statement? I think if i can get the compiling of game.utilities to happen before the game module i should be able to do this, but not sure how to do this?