Exemplo n.º 1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(this);
     }
 }
Exemplo n.º 2
0
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        DontDestroyOnLoad(gameObject);
    }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 4
0
    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
    }