
All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams
📖 Documentation • 🚀 Quick Start • 💬 QQ Group
🌐 Language: English | 简体中文 | 繁體中文 | 日本語 | 한국어
Alipay Mini Game platform adapter for the Game Frame X Advertisement system. This package provides rewarded video ad integration for games published on the Alipay Mini Game platform.
ENABLE_ALIPAY_MINI_GAME, ENABLE_ALIPAY_MINI_GAME_ADVERTISEMENT)This package is an adapter implementation of BaseAdvertisementManager from the Game Frame X Advertisement core. It is discovered and loaded automatically by AdvertisementComponent via Unity Inspector configuration.
| Class | Description |
|---|---|
AliPayMiniGameAdvertisementManager | Rewarded video ad manager — load, show, and lifecycle |
AliPayVideoAdCallback | Callback handler for ad load/show events |
GameFrameXAdvertisementAliPayMiniGameCroppingHelper | IL2CPP link.xml alternative — preserves type references |
{
"dependencies": {
"com.gameframex.unity.advertisement": "https://github.com/GameFrameX/com.gameframex.unity.advertisement.git",
"com.gameframex.unity.advertisement.alipayminigame": "https://github.com/GameFrameX/com.gameframex.unity.advertisement.alipayminigame.git"
}
}
Or add via git URL in the Unity Package Manager window.
Configure in Unity Inspector: add the AdvertisementComponent to a GameObject, then select AliPayMiniGameAdvertisementManager from the implementation dropdown.
using GameFrameX.Advertisement.Runtime;
// Standard: via GameEntry (no dependency on com.gameframex.unity.entry)
var adComponent = GameEntry.GetComponent<AdvertisementComponent>();
adComponent.SetExtraData("userId", player.UserId);
var option = new AdvertisementPlayOption
{
OnSuccess = (data) => Debug.Log("Ad shown successfully"),
OnFail = (err) => Debug.LogError($"Ad failed: {err}"),
OnShowResult = (watched) =>
{
if (watched)
{
// Reward the user
}
},
};
adComponent.Play(option);
// Shortcut: via GameApp (requires com.gameframex.unity.entry)
GameApp.Advertisement.SetExtraData("userId", player.UserId);
var option2 = new AdvertisementPlayOption
{
OnSuccess = (data) => Debug.Log("Ad shown successfully"),
OnFail = (err) => Debug.LogError($"Ad failed: {err}"),
OnShowResult = (watched) =>
{
if (watched)
{
// Reward the user
}
},
};
GameApp.Advertisement.Play(option2);
| Platform | Supported |
|---|---|
| Alipay Mini Game (WebGL) | Yes |
| Android | No |
| iOS | No |
| Standalone | No |
Requires
UNITY_WEBGLandENABLE_ALIPAY_MINI_GAMEscripting define symbols.
This project is licensed under the MIT License and Apache License 2.0.