• 参数

    • callback: () => void | Promise<void>

      The initialization function of the module.

    返回 void

    Adds an initialization function. Various engine modules, such as physics, pathfinding, etc., can register their initialization logic here if needed. Developers typically do not use this directly. All registered callbacks are executed in parallel.

    新增初始化函数,引擎各个模块,例如物理,寻路等,如果有初始化逻辑可以在这里注册初始化函数。 开发者一般不直接使用。所有注册的回调是并行执行。