MCPcopy Create free account
hub / github.com/esengine/esengine / installPlugin

Method installPlugin

packages/core/src/Core.ts:568–574  ·  view source on GitHub ↗

* @zh 安装插件 * @en Install plugin * * @param plugin - @zh 插件实例 @en Plugin instance * @throws @zh 如果Core实例未创建或插件安装失败 @en If Core instance not created or plugin installation fails * * @example * ```typescript * Core.create({ debug: true }); * * // @zh 安装

(plugin: IPlugin)

Source from the content-addressed store, hash-verified

566 * ```
567 */
568 public static async installPlugin(plugin: IPlugin): Promise<void> {
569 if (!this._instance) {
570 throw new Error('Core实例未创建,请先调用Core.create()');
571 }
572
573 await this._instance._pluginManager.install(plugin);
574 }
575
576 /**
577 * @zh 卸载插件

Callers 2

Calls 1

installMethod · 0.65

Tested by

no test coverage detected