1. Please install gamepix-sdk extension from the Cocos Store.
Use "GamePix" to search the extension.

2. Add the plugin to project using "Add to project" button.

GamePix sdk is provided by function gpx(), you can import it from gamepix module:
import { gpx } from "db://gamepix-sdk/gamepix";
gpx().<funtion name>();You can access all SDK using only gpx() function.
Let's declare function that handles key events and run Interstitial Ad.
import { gpx } from "db://gamepix-sdk/gamepix";
// ...
input.on(Input.EventType.KEY_UP, () => {
gpx().interstitialAd().then((res) => {
log("intestitialAd was shown?", res.success);
});
}, this);Let's declare function that handles key events and run Rewarded Ad.
import { gpx } from "db://gamepix-sdk/gamepix";
// ...
input.on(Input.EventType.KEY_UP, () => {
gpx().rewardAd().then((res) => {
log("rewardedAd was shown?", res.success);
});
}, this);gpx().lang() - gets the current preferred language by the playergpx().langSync() - same as lang(), but will return null if SDK is not yet initializedgpx().updateScore(score) - should be called immediately every time the current score is updatedgpx().updateLevel(level) - should be called to send the score after the player passed the levelgpx().happyMoment() - should be called when Happy Moment just happenedgpx().setItem(key, value) - persistently stores the value. The value must be a stringgpx().getItem(key) - read value from storagegpx().getItemSync(key) - same as getItem(), but will return null if SDK is not yet initialized