示例#1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(this);
     }
 }
示例#2
0
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        DontDestroyOnLoad(gameObject);
    }
示例#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);
    }
示例#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
    }