logo
1
0
WeChat Login
docs(readme): 重写为多语言 README 并统一 GitHub URL

GameFrameX Logo

Game Frame X - DouYin Mini Game Advertisement

Version License Documentation

All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams

📖 Documentation🚀 Quick Start


🌐 Language: English | 简体中文 | 繁體中文 | 日本語 | 한국어


Project Overview

DouYin Mini Game ad adapter layer for the GameFrameX advertisement component. Built on StarkSDK, it wraps rewarded video ad loading, display, and lifecycle management.

Quick Start

Option 1: Edit manifest.json

{
  "com.gameframex.unity.advertisement.douyinminigame": "https://github.com/gameframex/com.gameframex.unity.advertisement.douyinminigame.git"
}

Option 2: Unity Package Manager

Open Window > Package Manager, click + and select Add package from git URL:

https://github.com/gameframex/com.gameframex.unity.advertisement.douyinminigame.git

Option 3: Manual Install

Clone this repository into your Unity project's Packages/ directory. It will be detected automatically.

Usage Examples

This package is a sub-component of com.gameframex.unity.advertisement and does not expose public APIs directly. Use the main advertisement package for unified access:

Architecture

Features

  • Rewarded video ad loading and display
  • Ad load/show success and failure callbacks
  • Automatic valid-view detection on ad close
  • IL2CPP code stripping protection (Preserve attribute + CroppingHelper)
  • Conditional compilation (UNITY_WEBGL + ENABLE_DOUYIN_MINI_GAME)

Dependencies

DependencyDescription
com.gameframex.unity.advertisementMain ad package, provides BaseAdvertisementManager base class
starksdk.dllByteDance StarkSDK runtime library
ttsdk.dllByteDance TTSDK runtime library

Project Structure

Runtime/
├── DouYinMiniGame/
│   ├── DouYinMiniGameAdvertisementManager.cs   # Ad manager, inherits BaseAdvertisementManager
│   └── DouYinVideoAdCallback.cs                # Video ad callback handler
├── GameFrameXAdvertisementDouYinMiniGameCroppingHelper.cs  # Anti-stripping helper
└── GameFrameX.Advertisement.DouYinMiniGame.Runtime.asmdef   # Assembly definition

Platform Support

  • Code compiles only when UNITY_WEBGL and ENABLE_DOUYIN_MINI_GAME are defined.
  • The DouYin official SDK does not fully implement rewarded ad show success/failure callbacks; some callbacks may not fire.

Documentation & Resources

License

MIT