private void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(this); } }
void Awake() { if (Instance == null) { Instance = this; } DontDestroyOnLoad(gameObject); }
private float GetTopDzPx(Rect screenRectPx, Rect safeAreaPx) { float safeAreaTopPx = screenRectPx.yMax - safeAreaPx.yMax; float adHeightPx = GoogleAdManager.getBannerHeight(); if (Mathf.Approximately(adHeightPx, 0f)) { adHeightPx = screenRectPx.width * 0.15f; } return(safeAreaTopPx + adHeightPx); }
void Awake() { Instance = this; DontDestroyOnLoad(gameObject); InitAdmob(); #region //Debug.Log("Can't show ads in editor!"); //Admob.Instance().initAdmob(bannerID: _bannerId, fullID: _interstitialId); //Admob.Instance().setTesting(true); //Admob.Instance().loadInterstitial(); #endregion }