This is probably a very easy question to answer, but for some reason, I can't figure out what is wrong. I want my int showAd to decrease by one every time the Canvas1 is enabled. Here is code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GoogleMobileAds.Api;
public class AdManager : MonoBehaviour {
//public bool dead;
public int showAd = 3;
public InterstitialAd interstitial;
public BannerView bannerView;
public bool canShowInt;
void Start () {
RequestBanner ();
RequestInterstitial ();
}
void Awake () {
DontDestroyOnLoad (this);
}
void Update () {
if (GameObject.Find ("Canvas1").GetComponent
↧