예제 #1
0
    void Awake()
    {
        if (!Instance)
        {
            Instance = this;
            DontDestroyOnLoad(this);
        }
        else
        {
            Destroy(this.gameObject);
            Debug.LogWarning("You have duplicate AdMob Managers in your scene!");
        }

        AdmobAdAgent.RetainGameObject(ref _instanceFound, gameObject, null);
        AdmobAd.Instance();
    }
    void Awake()
    {
        if (Instance)
        {
            DebugLog("You have duplicate AdMob_Manager.cs scripts in your scene! Admob might not work as expected!");
            Destroy(gameObject);
            return;
        }

        Instance = this;
        DontDestroyOnLoad(this);

        if (EnableAdMob)
        {
            AdmobAdAgent.RetainGameObject(ref AdMobAndroidReady, gameObject, null);
            AdIns = AdmobAd.Instance();
        }
    }
예제 #3
0
 void Awake()
 {
     // Do not modify the codes below.
     AdmobAdAgent.RetainGameObject(ref _instanceFound, gameObject, null);
     AdmobAd.Instance();
 }