Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GalaxySmash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hà Trung (NEGAXY)
GalaxySmash
Commits
e4551c32
Commit
e4551c32
authored
Dec 14, 2021
by
Hà Trung (NEGAXY)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trung: Fix ads IOS
parent
a614ae8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
AdsController.cs
Assets/Negaxy Ads/Scripts/AdsController.cs
+35
-0
No files found.
Assets/Negaxy Ads/Scripts/AdsController.cs
View file @
e4551c32
...
@@ -22,6 +22,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
...
@@ -22,6 +22,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
public
string
openAdID
;
public
string
openAdID
;
public
string
nativeAdID
;
public
string
nativeAdID
;
[
Header
(
"ADMOB ID IOS"
)]
public
string
bannerID_IOS
;
public
string
interstitialID_IOS
;
public
string
rewardID_IOS
;
public
string
openAdID_IOS
;
public
string
nativeAdID_IOS
;
private
InterstitialAd
interstitial
;
private
InterstitialAd
interstitial
;
private
RewardedAd
rewardedAd
;
private
RewardedAd
rewardedAd
;
private
BannerView
bannerView
;
private
BannerView
bannerView
;
...
@@ -118,6 +125,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
...
@@ -118,6 +125,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
rewardedVideoAvailability
=
false
;
rewardedVideoAvailability
=
false
;
Invoke_RewardedVideoAvailabilityCallback
();
Invoke_RewardedVideoAvailabilityCallback
();
string
adUnitId
=
rewardID
;
string
adUnitId
=
rewardID
;
#if UNITY_ANDROID
adUnitId
=
rewardID
;
#elif UNITY_IOS
adUnitId
=
rewardID_IOS
;
#endif
if
(
testAds
)
if
(
testAds
)
{
{
#if UNITY_ANDROID
#if UNITY_ANDROID
...
@@ -231,6 +245,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
...
@@ -231,6 +245,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
private
void
RequestBanner
()
private
void
RequestBanner
()
{
{
string
adUnitId
=
bannerID
;
string
adUnitId
=
bannerID
;
#if UNITY_ANDROID
adUnitId
=
bannerID
;
#elif UNITY_IOS
adUnitId
=
bannerID_IOS
;
#endif
if
(
testAds
)
if
(
testAds
)
{
{
#if UNITY_ANDROID
#if UNITY_ANDROID
...
@@ -269,6 +290,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
...
@@ -269,6 +290,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
private
void
RequestInterstitial
()
private
void
RequestInterstitial
()
{
{
string
adUnitId
=
interstitialID
;
string
adUnitId
=
interstitialID
;
#if UNITY_ANDROID
adUnitId
=
interstitialID
;
#elif UNITY_IOS
adUnitId
=
interstitialID_IOS
;
#endif
if
(
testAds
)
if
(
testAds
)
{
{
#if UNITY_ANDROID
#if UNITY_ANDROID
...
@@ -393,6 +421,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
...
@@ -393,6 +421,13 @@ public class AdsController : MonoBehaviour, OnMaxCallBackListener
// return;
// return;
string
adUnitId
=
openAdID
;
string
adUnitId
=
openAdID
;
#if UNITY_ANDROID
adUnitId
=
openAdID
;
#elif UNITY_IOS
adUnitId
=
openAdID_IOS
;
#endif
if
(
testAds
)
if
(
testAds
)
{
{
#if UNITY_ANDROID
#if UNITY_ANDROID
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment