### GameplayStart Source: https://max-games.ru/doc Используйте метод GameplayStart, чтобы дать сигнал платформе о начале геймплея. ```csharp GameplayStart() ``` -------------------------------- ### GameplayStop Source: https://max-games.ru/doc Используйте метод GameplayStop, чтобы дать сигнал платформе об остановке геймплея. Применяется при паузах, таких как открытие/закрытие рекламы. ```csharp GameplayStop() ``` -------------------------------- ### Configure WebGL Template for Unity Source: https://max-games.ru/doc When porting to WebGL, ensure the correct template is selected in Player Settings. Alternatively, use Auto Apply Settings for automatic configuration. ```csharp In Basic Settings → Platform, select the platform. For WebGL porting, select the corresponding template in Player Settings → Resolution and Presentation → WebGL Template. Alternatively, check Auto Apply Settings under the Platform field. This automatically applies the template and other plugin-suggested settings. ``` -------------------------------- ### Import InterstitialAdv Module Source: https://max-games.ru/doc To use the InterstitialAdv module, open your version control tool and import it. Once imported, it will be located in the Modules folder. ```bash Open your version control tool. Download and import the InterstitialAdv module for example. ``` -------------------------------- ### Check Preprocessor Defines for Modules Source: https://max-games.ru/doc If you encounter issues with the plugin, verify that all preprocessor defines are correctly set. You can also try updating module information by deleting the ModulesListYG2.txt file. ```csharp Check if all defines are correctly set and adjust them if necessary. Try updating module data in the project by deleting the file PluginYourGames/Editor/ModulesListYG2.txt ``` -------------------------------- ### Импорт PluginYG Source: https://max-games.ru/doc Импортируйте PluginYG в начале вашего скрипта, чтобы получить доступ к его функциональности. ```csharp using YG; ``` -------------------------------- ### Disable Module Compression Source: https://max-games.ru/doc On external hosts, you may need to disable compression for the game to launch. This setting can be found within the platform settings. ```csharp In the platform settings, you can disable compression. On an external host, this is likely necessary for the game to launch. ``` -------------------------------- ### GameReadyAPI Source: https://max-games.ru/doc Выполняйте метод GameReadyAPI, когда игра загрузилась и пользователь может приступить к геймплею. Необходимо использовать, если в Basic Settings отключена галка Auto GRA. ```csharp GameReadyAPI() ``` -------------------------------- ### Enable Own Host Option Source: https://max-games.ru/doc When hosting your game on a custom server for Yandex Games, enable the Own Host option in the platform settings. This adds the necessary connection string to index.html. ```csharp To host the game on your own server for Yandex Games, enable the Own Host option located in the platform settings (Platform field in Basic Settings). This will add the corresponding connection string to index.html. ``` -------------------------------- ### HappyTime Source: https://max-games.ru/doc Доступ к функциональности счастливого времени через объект optionalPlatform. ```csharp YG2.optionalPlatform.HappyTime ``` -------------------------------- ### Вызов рекламы Source: https://max-games.ru/doc Используйте метод InterstitialAdvShow класса YG2 для вызова межстраничной рекламы. ```csharp YG2.InterstitialAdvShow(); ``` -------------------------------- ### Modify IsLocalHost Function for Local Testing Source: https://max-games.ru/doc To test your game locally with SDK connection, adjust the IsLocalHost function in the Index.html file. This file can be edited within the WebGLTemplates/YandexGames folder. ```javascript // For local testing of the game with SDK connection, modify the IsLocalHost function in Index.html as needed. // This file can be adjusted in the WebGLTemplates/YandexGames folder. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.