Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wolf-org/advertising-unity
Support advertising unity
https://github.com/wolf-org/advertising-unity
admob advertising applovin-max unity unity3d
Last synced: about 22 hours ago
JSON representation
Support advertising unity
- Host: GitHub
- URL: https://github.com/wolf-org/advertising-unity
- Owner: wolf-org
- License: mit
- Created: 2023-09-23T08:54:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-27T09:11:55.000Z (3 months ago)
- Last Synced: 2024-08-28T09:43:21.504Z (3 months ago)
- Topics: admob, advertising, applovin-max, unity, unity3d
- Language: C#
- Homepage:
- Size: 165 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## What
### Show ads tool for unity games (support for Max-Applovin, Google Mobile Ads and IronSource-UnityLevelPlay)## How To Install
### Add the line below to `Packages/manifest.json`
for version `1.1.4`
```csharp
"com.wolf-org.advertising":"https://github.com/wolf-org/advertising-unity.git#1.1.4",
```
dependency `extensions-unity-1.0.5`
```csharp
"com.wolf-org.extensions":"https://github.com/wolf-org/extensions-unity.git#1.0.5",
```Install `app-tracking-unity` and add define symbol `VIRTUESKY_TRACKING` if you need ad revenue tracking
```csharp
"com.wolf-org.tracking":"https://github.com/wolf-org/app-tracking-unity.git#1.0.3",
```## Use
- Use via MenuItem `Unity-Common` > `AdSettings` or shortcut `Ctrl + E / Command + E` to open `AdSettings`
![Unity_SkbG2UOp9G](https://github.com/wolf-package/advertising/assets/126542083/ce4bddc9-61ae-4b62-b7bc-0588d0eacff6)
- Here, select `Ad Network` and enter the ad unit id you want to use, don't forget add `Define Symbol`.
- Add `Scripting Define Symbols` in `Project Settings` > `Player` > `Other Settings`
- Applovin: `VIRTUESKY_ADS` and `VIRTUESKY_APPLOVIN`
- Admob: `VIRTUESKY_ADS` and `VIRTUESKY_ADMOB`
- IronSource: `VIRTUESKY_ADS` and `VIRTUESKY_IRONSOURCE`
- If you use `Runtime auto init`, `Advertising` will be created automatically when you load the scene. Conversely, you would attach `Advertising` to the GameObject in the scene so that the ads can be loaded![Screenshot 2024-05-16 174541](https://github.com/wolf-package/unity-common/assets/102142404/451834ff-91e3-4ccf-90bd-b0c1d4b4f440)
- Demo API Show Ads
```csharp
public void ShowBanner()
{
Advertising.BannerAd.Show();
}public void HideBanner()
{
Advertising.BannerAd.HideBanner();
}public void ShowInter()
{
Advertising.InterstitialAd.Show().OnCompleted(() =>
{
// handle show inter completed
});
}public void ShowReward()
{
Advertising.RewardAd.Show().OnCompleted(() =>
{
// handle show reward completed
}).OnSkipped(() =>
{
// handle skip reward
});
}public void ShowRewardInter()
{
Advertising.RewardedInterstitialAd.Show().OnCompleted(() => { });
}public void ShowAppOpen()
{
Advertising.AppOpenAd.Show();
}```