private void ShowNativeAd(AbstractNativeAd nativeAd) { nativeAd.transform.localPosition = new Vector3(0, 700, 115); nativeAd.transform.rotation = Quaternion.Euler(Vector3.up); nativeAd.transform.Rotate(new Vector3(Random.Range(15, 45), Random.Range(-10, 10), Random.Range(-10, 10))); nativeAd.GetComponent <Rigidbody>().useGravity = true; nativeAd.Show(); _adUnitToShownMapping[nativeAd.AdUnitId] = true; MoPubManager.Instance.EmitNativeImpressionEvent(nativeAd.AdUnitId); }
private void HideNativeAd(AbstractNativeAd nativeAd) { nativeAd.GetComponent <Rigidbody>().useGravity = false; nativeAd.Hide(); _adUnitToShownMapping[nativeAd.AdUnitId] = false; }