** This project is currently on hold and I hope to have more time to update this project :( **
- Easy to use
- Operation interface
- Ad formats support:
Banner
Interstitial
Rewarded
Rewarded interstitial
- (Optional)
Native Ads Advanced (Unified)
- Unity 2020.3.11f1
- External Dependency Manager for Unity v1.2.165
- Google Mobile Ads Unity Plugin v6.0.0
- (Optional) Google Mobile Ads Unity Plugin v5.4.0.90
- Contains Native Ads Advanced (Unified) functions
- Unity 2020 (LTS) and above.
- Google Mobile Ads Unity Plugin v6.0.0
- (Optional) Native ads build of the Unity plugin.
- Require native ads build of the Google Mobile Ads Unity plugin to support Native Ads Advanced.
Mediation Test Suite plugin.- Currently Google Mobile Ads Mediation Test Suite does not support Google Mobile Ads Unity Plugin v6.0.0
- Download and Import Package.
- Adding an Ads Object to the scene.
Banner
Interstitial
Rewarded
Rewarded interstitial
- (Optional)
Native Ads Advanced (Unified)
- Manually request ads.
CTJ.Ads.Instance.RequestBanner();
CTJ.Ads.Instance.RequestInterstitial();
CTJ.Ads.Instance.RequestRewarded();
CTJ.Ads.Instance.RequestRewardedInterstitial();
CTJ.Ads.Instance.RequestNative(); // Optional
CTJ.Ads.Instance.ForceRequestNative(); // Optional
- Show ads.
CTJ.Ads.Instance.ShowBannerAd();
CTJ.Ads.Instance.ShowInterstitialAd();
CTJ.Ads.Instance.ShowRewardedAd();
CTJ.Ads.Instance.ShowRewardedInterstitialAd();
CTJ.Ads.Instance.ShowMediationTestSuite(); // Optional
- Destroy ads.
CTJ.Ads.Instance.DestroyBannerAd();
CTJ.Ads.Instance.DestroyInterstitialAd();
CTJ.Ads.Instance.DestroyUnifiedNativeAd(); // Optional
- (Optional) Initialize native ads.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Demo : MonoBehaviour
{
[SerializeField] private GameObject _NativeObject;
[SerializeField] private GameObject _AdChoicesLogo;
[SerializeField] private GameObject _Advertiser;
[SerializeField] private GameObject _Body;
[SerializeField] private GameObject _CallToAction;
[SerializeField] private GameObject _Headline;
[SerializeField] private GameObject _Icon;
private void Start()
{
_NativeObject.SetActive(false);
CTJ.Ads.Instance.EventAddListener_NativeInitialize(DemoNativeInitialize);
}
public void DemoNativeInitialize()
{
_AdChoicesLogo.GetComponent<RawImage>().texture = CTJ.Ads.Instance.GetAdChoicesLogo;
_Advertiser.GetComponent<Text>().text = CTJ.Ads.Instance.GetAdvertiser;
_Body.GetComponent<Text>().text = CTJ.Ads.Instance.GetBody;
_CallToAction.GetComponent<Text>().text = CTJ.Ads.Instance.GetCallToAction;
_Headline.GetComponent<Text>().text = CTJ.Ads.Instance.GetHeadline;
_Icon.GetComponent<RawImage>().texture = CTJ.Ads.Instance.GetIcon;
CTJ.Ads.Instance.RegisterAdChoicesLogo(_AdChoicesLogo);
CTJ.Ads.Instance.RegisterAdvertiser(_Advertiser);
CTJ.Ads.Instance.RegisterBody(_Body);
CTJ.Ads.Instance.RegisterCallToAction(_CallToAction);
CTJ.Ads.Instance.RegisterHeadline(_Headline);
CTJ.Ads.Instance.RegisterIcon(_Icon);
_NativeObject.SetActive(true);
}
}