Написал я скрипт вот он: using System.Collections; using System.Collections.Generic; using UnityEngine; using GoogleMobileAds.Api; public class InterAd : MonoBehaviour { private InterstitialAd interstitialAd; private string interstitialUnitId = "ca-app-pub-3940256099942544/8691691433"; private void OnEnable() { interstitialAd = new InterstitialAd(interstitialUnitId); AdRequest adRequest = new AdRequest.Builder().Build(); interstitialAd.LoadAd(adRequest); } public void ShowAd() { if (interstitialAd.IsLoaded()) interstitialAd.Show(); } }
и я хочу загрузить в main camera 2d а тут ошибка : Can't add script component 'InterAd' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match.ПОМОГИТЕ!
и я хочу загрузить в main camera 2d а тут ошибка : Can't add script component 'InterAd' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match.ПОМОГИТЕ!