Skip to content

Commit e013c53

Browse files
authored
Update README.md
1 parent 1a9260a commit e013c53

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ for version `1.0.4`
3030

3131
## Use
3232

33+
- Use via MenuItem `Unity-Common` > `AdSettings` or shortcut `Ctrl + E / Command + E` to open `AdSettings`
34+
35+
36+
![Unity_SkbG2UOp9G](https://github.com/wolf-package/advertising/assets/126542083/ce4bddc9-61ae-4b62-b7bc-0588d0eacff6)
37+
38+
39+
40+
- Here, select `Ad Network` and enter the ad unit id you want to use, don't forget add `Define Symbol`.
41+
- 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
42+
43+
![Screenshot 2024-05-16 174541](https://github.com/wolf-package/unity-common/assets/102142404/451834ff-91e3-4ccf-90bd-b0c1d4b4f440)
44+
3345

3446
- Import `Scripting Define Symbols` in `Project Settings` > `Player` > `Other Settings`
3547
- Applovin: `VIRTUESKY_ADS` and `VIRTUESKY_MAX`
@@ -38,3 +50,49 @@ for version `1.0.4`
3850
- Tracking revenue by Firebase Analytic: `VIRTUESKY_FIREBASE_ANALYTIC`
3951
- Tracking revenue by AppsFlyer: `VIRTUESKY_APPSFLYER`
4052

53+
- Demo API Show Ads
54+
55+
```csharp
56+
57+
public void ShowBanner()
58+
{
59+
Advertising.BannerAd.Show();
60+
}
61+
62+
public void HideBanner()
63+
{
64+
Advertising.BannerAd.HideBanner();
65+
}
66+
67+
public void ShowInter()
68+
{
69+
Advertising.InterstitialAd.Show().OnCompleted(() =>
70+
{
71+
// handle show inter completed
72+
});
73+
}
74+
75+
public void ShowReward()
76+
{
77+
Advertising.RewardAd.Show().OnCompleted(() =>
78+
{
79+
// handle show reward completed
80+
}).OnSkipped(() =>
81+
{
82+
// handle skip reward
83+
});
84+
}
85+
86+
public void ShowRewardInter()
87+
{
88+
Advertising.RewardedInterstitialAd.Show().OnCompleted(() => { });
89+
}
90+
91+
public void ShowAppOpen()
92+
{
93+
Advertising.AppOpenAd.Show();
94+
}
95+
96+
```
97+
98+

0 commit comments

Comments
 (0)