using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using GoogleMobileAds.Api;
public class PowerSlashADS : MonoBehaviour
{
ย
ย private InterstitialAd interstitial;
ย
ย Resource resource;
ย private readonly string InterstitialID = "ca-app-pub-00000000000000/0000000000000";
ย // public GameObject psrechangWin;
public void Start()
ย ย { ย ย ย ย
ย ย ย ย interstitial = new InterstitialAd(InterstitialID);
ย ย ย resource = GameObject.Find("Coin&Resource").GetComponent<Resource>();
ย ย ย ย RequestConfiguration requestConfiguration =
ย ย ย ย new RequestConfiguration.Builder()
ย ย ย ย .SetSameAppKeyEnabled(true).build();
ย ย ย ย MobileAds.SetRequestConfiguration(requestConfiguration);
ย ย ย ย // Initialize the Google Mobile Ads SDK.
ย ย ย ย MobileAds.Initialize(initStatus => { });
ย ย ย ย ย load();
ย ย }
public void Update(){
ย ย
}
ย ย //๊ตฌ๊ธ์์ ๊ด๊ณ ๋ฅผ ๋ถ๋ฌ์ ์ ์ฅํด๋์ต๋๋ค.
ย ย private void load()
ย ย {
ย ย ย ย AdRequest _request = new AdRequest.Builder().Build();
ย ย ย ย interstitial.LoadAd(_request);
ย ย }
'InterstitialAd.InterstitialAd(string)'์(๋) ์ฌ์ฉ๋์ง ์์ต๋๋ค. 'Use InterstitialAd.Load().' [Assembly-CSharp]csharp(CS0618)
๋นจ๊ฐ์์ผ๋ก ํ์ํ ๋ถ๋ถ์ด ๋
ธ๋ ๋ฐ์ค๋ก ํ์๋๋ฉด์ย
์์ ๊ฐ์ ๋ฉ์ธ์ง๊ฐ ๋์ค๋๋ฐ ์ด๊ฑด ๊ฒ์ํด๋ด๋ ์๋์ค๋๊ฒ ๊ฐ์ต๋๋ค.
์์ธ์ด ๋ญ๊น์
"string"์ด๋ string ๋ณ์ ๋ถ๋ฌ์์ผํ๋ ๊ฑฐ ์๋? InterstitialID ๊ฐ String์?
์ด ์ค๋ฅ๋ InterstitialAd.InterstitialAd(string) ์์ฑ์ ๋ฉ์๋๋ฅผ ์ฌ์ฉํ์ง ๋ง๋ผ๋ ๊ฒฝ๊ณ ๋ฉ์์ง์ ๋๋ค. ๋์ InterstitialAd.Load() ๋ฉ์๋๋ฅผ ์ฌ์ฉํ์ฌ ๊ด๊ณ ๋ฅผ ๋ก๋ํด์ผํฉ๋๋ค. interstitial = new InterstitialAd(InterstitialID); ์ ์ฝ๋๋ฅผ interstitial = new InterstitialAd(); interstitial.AdUnitId = InterstitialID; ์ด๊ฒ์ผ๋ก ๋ฐ๊พธ์ด ์ฃผ์ธ์ ๊ทธ๋ฆฌ๊ณ ๊ด๊ณ ๋ฅผ ๋ก๋ํ๋ load() ๋ฉ์๋๋ ์ด๋ฏธ InterstitialAd.Load() ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๊ณ ์๊ธฐ ๋๋ฌธ์ ๋ณ๊ฒฝํ ํ์๊ฐ ์์ต๋๋ค.
์ด๊ฒ interstitial = new InterstitialAd(); interstitial.AdUnitId = InterstitialID; ๋ก ์น๋๊น interstitia ์์ฒด๊ฐ ๋นจ๊ฐ์ค์ด ๋จ๋๋ฐ์? ์ผ๋จ ๋ ธ๋์ค์ํ์์๋ ๊ด๊ณ ๋ ์ ๋์ค๋๋ฏํ์ฌ ์ผ๋จ ๋ ๋์ด์.
๊ฒ ๊ณ ์ํด์๋ง๋ ๊ฑฐ๊ฐ์๋ฐ ์ ๋ด๋ ค๋ฒ๋ ธ์ - dc App
์ ๋ฃ๋ ์๊ณ ๋ณด๋๊น ์ ์ฐ๋ฐ์ผ๋ ค๋ฉด ๊ตฌ์ฒญ์ ์ ๊ณ ๋ ํด์ผํ๊ณ ํต์ ํ๋งค์ ๋ ์์ด์ผ ํ๋ค๊ณ ํด์ ๊ด๊ณ ๋ฒ์ ๋ง ๋จ๊ฒจ๋ ์ ใ ใ