Exemple #1
0
    bool isDebugMode = true; // should be false when shipped

    #endregion Fields

    #region Methods

    public static UnityAdsManager GetInstance()
    {
        if ( _instance == null )
        {
            GameObject go = new GameObject("UnityAdsManager");
            _instance = go.AddComponent<UnityAdsManager>();

            _instance.Init();
        }
        return _instance;
    }
Exemple #2
0
    public static UnityAdsManager GetInstance()
    {
        if (_instance == null)
        {
            GameObject go = new GameObject("UnityAdsManager");
            _instance = go.AddComponent <UnityAdsManager>();

            _instance.Init();
        }
        return(_instance);
    }
Exemple #3
0
    void InitAds()
    {
        Admob = new AdmobManager();
        Unity = new UnityAdsManager();
        if (Application.platform == RuntimePlatform.Android)
        {
            Admob.Init(Data.AndroidInfor.Admob);
            Unity.Init(Data.AndroidInfor.UnityVideoId);

            Debug.Log("API init android infors");
        }
        else if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            Admob.Init(Data.IosInfor.Admob);
            Unity.Init(Data.IosInfor.UnityVideoId);
            Debug.Log("API init iOS infors");
        }
        else
        {
            Admob.Init(Data.IosInfor.Admob);
            Unity.Init(Data.IosInfor.UnityVideoId);
            Debug.Log("API init other platform infors");
        }
    }