Adding plugin to a Unity project

Learn how to add the GamePush plugin to your Unity project.

#Setup

Open the Public Zone in the game you want:

In the Unity project, open:

Edit > Project Settings > Player > Resolution and Presentation

Select WebGL Template - GamePush and fill:

Project id and Public Token of your project as on the screenshot:

REQUIRED!

Open the GamePush folder and drop Prefab - GameScoreSDK - into the project hierarchy

#Working with the plugin in scripts

#Rewarded ad example

#Useful information

To check if the ad is installed correctly:

In the Unity editor, stubs are substituted with the output of the necessary information in the Console. They look like this:

If errors appear in the Unity editor as:

These methods of the plugin are not stubbed, and to check all the functionality of the plugin, you need to create a Build game and check it on the right site or on the hosting.

The project uses WEBGL Template:
https://github.com/greggman/better-unity-webgl-template

In the folder:
Assets/WebGLTemplates/GamePush/logo.png
You can change the logo to your own, it will be displayed when loading.

The plugin inherits the hierarchy and naming convention from sdk, you can refer to the documentation for more information about methods work.

Repository link: https://gitlab.com/Dinmo-games/gamescore_unity

Methods list: https://gitlab.com/Dinmo-games/gamescore_unity/-/tree/master/GS%20Unity%20-%20Demo/Assets/GameScore/Modules

Author: @Dinar_Shagidullin

GamePush Community (Telegram): @gs_community

We wish you success!