安装
从 Cocos Store 安装插件
您可以直接从 Cocos Store 安装插件。
从仓库安装插件
加载插件后,在 Cocos Creator 中打开项目或创建新项目。 在顶部面板中,将鼠标悬停在 Extension 上,然后选择 Extension Manager。

接下来,将指针悬停在 Import Extension File (.zip) 上,并在出现的菜单中选择您之前下载的插件。

模板配置
安装插件后,您很可能会看到类似下面所示的消息。 这是因为 Yandex Games 需要 Yandex Games SDK 直接导入到编译后出现的文件(如 index.html)中。
![Cocos Creator 控制台中警告的截图:"[yandex-games-sdk] Failed to find build-templates/web-desktop template! [yandex-games-sdk] Failed to find build-templates/web-mobile template! [yandex-games-sdk] Failed to find preview-template template!"](https://cdn-viewer.diplodoc.com/docs-assets/dev-games/rev/r21993288/zh/_images/cocos/installation/templates-failure.webp)
要解决此问题,请访问 Yandex Games SDK 的新部分,并选择生成模板的选项,以便插件自行生成所需的模板。 您也可以手动编写它们。
如果模板编译成功,插件应在控制台中输出类似下面所示的消息。 这意味着一切正常,您可以开始工作了。
![Cocos Creator 控制台中消息的截图:"Register native engine in D:rogrammsocos-dashbo..., [yandex-games-sdk] Templates looks fine! [Scene] [Physics] [Bullett]' Using asmis Bullet libs".](https://cdn-viewer.diplodoc.com/docs-assets/dev-games/rev/r21993288/zh/_images/cocos/installation/templates-success.webp)
欲了解更详细的信息,请参阅:构建模板配置,Cocos Creator 网页预览配置。