void OnEnable()
    {
        if (PlayOnEnable)
        {
            SoundBase.Instance.GetComponent <AudioSource>().PlayOneShot(SoundBase.Instance.swish[0]);

            //if( !GetComponent<SequencePlayer>().sequenceArray[0].isPlaying )
            //    GetComponent<SequencePlayer>().Play();
        }
        if (name == "MenuPlay")
        {
            for (int i = 1; i <= 3; i++)
            {
                transform.Find("Image").Find("Star" + i).gameObject.SetActive(false);
            }
            int stars = PlayerPrefs.GetInt(string.Format("Level.{0:000}.StarsCount", PlayerPrefs.GetInt("OpenLevel")), 0);
            if (stars > 0 && stars <= 3)
            {
                for (int i = 1; i <= stars; i++)
                {
                    transform.Find("Image").Find("Star" + i).gameObject.SetActive(true);
                }
            }
            else
            {
                for (int i = 1; i <= 3; i++)
                {
                    transform.Find("Image").Find("Star" + i).gameObject.SetActive(false);
                }
            }
        }

        if (name == "PrePlay")
        {
            // GameObject
        }
        if (name == "PreFailed")
        {
            SoundBase.Instance.GetComponent <AudioSource>().PlayOneShot(SoundBase.Instance.gameOver[0]);
            transform.Find("Video").gameObject.SetActive(true);
            transform.Find("Buy").GetComponent <Button>().interactable = true;

            GetComponent <Animation>().Play();
        }

        if (name == "Settings" || name == "MenuPause")
        {
            if (PlayerPrefs.GetInt("Sound") == 0)
            {
                transform.Find("Image/Sound/SoundOff").gameObject.SetActive(true);
            }
            else
            {
                transform.Find("Image/Sound/SoundOff").gameObject.SetActive(false);
            }

            if (PlayerPrefs.GetInt("Music") == 0)
            {
                transform.Find("Image/Music/MusicOff").gameObject.SetActive(true);
            }
            else
            {
                transform.Find("Image/Music/MusicOff").gameObject.SetActive(false);
            }
        }

        if (name == "GemsShop")
        {
            for (int i = 1; i <= 4; i++)
            {
                transform.Find("Image/Pack" + i + "/Count").GetComponent <Text>().text     = "" + LevelManager.THIS.gemsProducts[i - 1].count;
                transform.Find("Image/Pack" + i + "/Buy/Price").GetComponent <Text>().text = "$" + LevelManager.THIS.gemsProducts[i - 1].price;
            }
        }
        if (name == "MenuComplete")
        {
            for (int i = 1; i <= 3; i++)
            {
                transform.Find("Image").Find("Star" + i).gameObject.SetActive(false);
            }
        }

        if (transform.Find("Image/Video") != null || transform.Find("Video") != null)
        {
            var videoButton = transform.Find("Image/Video") == null?transform.Find("Video") : transform.Find("Image/Video");

            if (videoButton == null)
            {
                return;
            }
            if (videoButton.GetComponent <RewardedButton>() == null)
            {
                RewardedButton b = videoButton.gameObject.AddComponent <RewardedButton>();
                b.type = GetReward();
                b.SetEnabled();
            }
#if UNITY_ADS
            InitScript.Instance.rewardedVideoZone = "rewardedVideo";

            if (!InitScript.Instance.enableUnityAds || !InitScript.Instance.GetRewardedUnityAdsReady())
            {
                videoButton.gameObject.SetActive(false);
            }
#elif GOOGLE_MOBILE_ADS//2.2
            bool stillShow = true;
#if UNITY_ADS
            stillShow = !InitScript.Instance.GetRewardedUnityAdsReady();
#endif
            if (!InitScript.Instance.enableGoogleMobileAds || !RewAdmobManager.THIS.IsRewardedAdIsLoaded() || !stillShow)
            {
                transform.Find("Image/Video").gameObject.SetActive(false);
            }
#else
            transform.Find("Image/Video").gameObject.SetActive(false);
#endif
        }
    }