Add TapADN IAA debug sample

This commit is contained in:
2026-06-04 17:34:11 +08:00
parent aff6890c22
commit 09fe0f0f35
8 changed files with 1023 additions and 2 deletions

View File

@@ -1,5 +1,47 @@
# TapADN IAA Ad Debug Sample
This optional sample is intentionally lightweight. Import it in a host project, create an `ADConfig`, and initialize with `TapadnCommercialization.InitADManager(...)` to validate rewarded, interstitial, and splash slots.
## Files
The main package does not import debug scenes or editor panels by default.
- Scene:
- `Assets/Samples/IAAAdDebugSample/Scenes/IAAAdDebugSample.unity`
- Config:
- `Assets/Samples/IAAAdDebugSample/Configs/IAAAdDebugSampleConfig.asset`
- Runtime GUI:
- `Assets/Samples/IAAAdDebugSample/Runtime/TapadnIAAAdDebugSampleGui.cs`
## Setup
1. Import this sample from Package Manager.
2. Open `IAAAdDebugSampleConfig.asset`.
3. Fill these fields:
- `Id` = TapADN / Dirichlet MediaId.
- `Key` = MediaKey.
- `Key2` = MediaName.
- `BaseAwardAdKeyValue.value` = rewarded SpaceId.
- `BaseInteractionAdKeyValue.value` = interstitial SpaceId.
- `BaseSplashAdKeyValue.value` = splash SpaceId.
4. Open `IAAAdDebugSample.unity`.
5. Build and run on Android device.
## Debug Panel
The scene uses an IMGUI panel and supports:
- Initialize `ADManager`.
- Enter rewarded/interstitial/splash scenarios.
- Load rewarded/interstitial/splash.
- Async play rewarded/interstitial/splash.
- View ready state and TapADN init status.
- Copy logs to clipboard.
- Export logs to `Application.persistentDataPath/TapadnIAAAdDebugLogs`.
## Default Strategy
- `tapadn.debug=true`
- `tapadn.channel=unity_sample`
- Rewarded/interstitial/splash all use auto-ad mode by default.
- Prewarm is off by default to keep the first test action explicit.
## Notes
This sample is optional and lives under `Samples~`, so it is not imported into game projects unless explicitly selected.