Unity ads integration
Integrates Unity's first-party ad network into Unity projects. Use when handling Unity Ads SDK placement IDs, initialization sequences, and C# Advertisement APIs.From its SKILL.md
npx -y skills add meyverick/agy-skills --skill unity-ads-integrationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.3 KB, 473 tokens by cl100k_base, as published. Nobody here has run it
Unity Ads Integration
This skill standardizes the implementation of the first-party Unity Ads SDK. It enforces the strict lifecycle of initialization, loading, and showing, leveraging the standard IUnityAdsInitializationListener and IUnityAdsLoadListener interfaces.
When to Use
- Use when integrating
UnityEngine.Advertisementsinto a mobile Unity project. - Use when triggering rewarded videos or interstitial ads natively.
- NOT for building HTML5 playable ads or integrating AppLovin MAX.
Core Process
Phase 1: Interface Adherence
- The ad manager script MUST implement
IUnityAdsInitializationListener,IUnityAdsLoadListener, andIUnityAdsShowListener. - Do not attempt to poll the SDK state manually in
Update().
Phase 2: The Load & Show Lifecycle
- Initialize: Call
Advertisement.Initialize(). Wait forOnInitializationComplete. - Load: Call
Advertisement.Load(placementId). Wait forOnUnityAdsAdLoaded. - Show: Only call
Advertisement.Show(placementId)if the ad has successfully loaded.
Phase 3: Reward State Verification
- Inside
OnUnityAdsShowComplete, explicitly checkshowCompletionState == UnityAdsShowCompletionState.COMPLETEDbefore granting the player their reward.
Common Rationalizations
| Rationalization | Reality |
|---|---|
"I'll just call Advertisement.Show() and catch the error if it fails." | Unity Ads will throw hard exceptions or lock the UI if Show() is called before OnUnityAdsAdLoaded. You must respect the lifecycle. |
| "I'll grant the reward as soon as the video starts." | Users will immediately close the app or skip the ad. Rewards must strictly be granted in the COMPLETED state callback. |
Red Flags
- Missing interface implementations on the AdManager class.
- Calling
Advertisement.Load()immediately afterAdvertisement.Initialize()without waiting for the completion callback.
Verification
Before finalizing the Unity Ads integration:
- The manager script implements all 3 core Unity Ads listeners.
-
Load()is only triggered afterOnInitializationComplete. - Rewards are strictly tied to the
COMPLETEDenum state.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.