public void SetInPlayAd(CachedInplay inplay) //call from ShowInPlayAd & after click the inplayad. { if (inplay != null) { AdMob.destroyBanner(); //inplay광고로 대체됨. if (mInplayAd != null) { GameObject.Destroy(mInplayAd); mInplayAd = null; } mInplayAd = (GameObject)Instantiate(inPlayAd, Vector3.zero, Quaternion.identity); mInplayAd.transform.parent = inPlayAdSpawnPoint; mInplayAd.GetComponent <InPlayAd>().SetInplayData(inplay); inplay.Show(); } else { if (mInplayAd != null) { GameObject.Destroy(mInplayAd); mInplayAd = null; ShowBanner(); } } }
public void SetInplayData(CachedInplay inplay) { mInplay = inplay; transform.localPosition = Vector3.zero; transform.localScale = new Vector3(1f, 1f, 1f); mIcon.mainTexture = inplay.icon; mLogo.mainTexture = inplay.logo; inplay.Show(); GAManager.Instance.GAInplayEvent("display"); }