** This project is currently on hold and I hope to have more time to update this project :( **
Banner
Interstitial
Rewarded
Rewarded interstitial
Native Ads Advanced (Unified)
Banner
Interstitial
Rewarded
Rewarded interstitial
Native Ads Advanced (Unified)
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
CTJ.Ads.Instance.ShowBannerAd();
CTJ.Ads.Instance.ShowInterstitialAd();
CTJ.Ads.Instance.ShowRewardedAd();
CTJ.Ads.Instance.ShowRewardedInterstitialAd();
CTJ.Ads.Instance.ShowMediationTestSuite(); // Optional
CTJ.Ads.Instance.DestroyBannerAd();
CTJ.Ads.Instance.DestroyInterstitialAd();
CTJ.Ads.Instance.DestroyUnifiedNativeAd(); // Optional
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);
}
}