Esempio n. 1
0
    void Awake()
    {
        //check if GoogleAdBannerObject Exits
        if (googleAdBannerObject)
        {
            //it does so destory this object
            Destroy(gameObject);
        }
        else
        {
            //else make set GoogleAdbannerObject to this object and dont destroy on load
            googleAdBannerObject = gameObject;
            DontDestroyOnLoad(gameObject);
        }

        switch (targetPlatform)
        {
        case platforms.Google:
            selectedAdID = googleAdID;
            break;

        case platforms.Amazon:
            selectedAdID = amazonAdID;
            break;

        case platforms.iOS:
            selectedAdID = iosAdID;
            break;
        }

        switch (adLocation)
        {
        case adLocations.Top:
            adPostion = AdPosition.Top;
            break;

        case adLocations.Bottom:
            adPostion = AdPosition.Bottom;
            break;
        }
    }
    void Awake()
    {
        //check if GoogleAdBannerObject Exits
                if (googleAdBannerObject) {
                        //it does so destory this object
                        Destroy (gameObject);
                } else {
                        //else make set GoogleAdbannerObject to this object and dont destroy on load
                        googleAdBannerObject = gameObject;
                        DontDestroyOnLoad (gameObject);
                }

                switch (targetPlatform) {
                case platforms.Google:
                        selectedAdID = googleAdID;
                        break;
                case platforms.Amazon:
                        selectedAdID = amazonAdID;
                        break;
                case platforms.iOS:
                        selectedAdID = iosAdID;
                        break;
                }

                switch (adLocation) {
                case adLocations.Top:
                        adPostion = AdPosition.Top;
                        break;
                case adLocations.Bottom:
                        adPostion = AdPosition.Bottom;
                        break;
                }
    }