Interface OnInit

Hook into the OnInit lifecycle event.

interface OnInit {
    OnInit(): void | Promise<void>;
}

Methods

Methods

  • This function will be called whenever the game is starting up. This should only be used to setup your object prior to other objects using it.

    It's safe to load dependencies here, but it is not safe to use them. Yielding or returning a promise will delay initialization of other dependencies.

    Returns void | Promise<void>

    Hideinherited