melonJS
    Preparing search index...

    Function remove

    • Unregister a level, the reverse of level.add: the loader calls it when unloading a bundle frees the map or scene the level was built from, and the map's parser registers it again (at the end of the level order) when that bundle is loaded again.

      Unregistering the CURRENT level leaves the world as it is — what was built from the level stays there and keeps running — but there is then no current level: level.getCurrentLevelId returns undefined, so level.reload has nothing to reload, until a level is loaded again.

      A format registered with level.registerFormat calls it itself, for each of its levels, when the file they were read from is unloaded.

      Parameters

      • levelId: string

        the level id (or name)

      Returns boolean

      true if the level was registered