private IEnumerator FadeAndLoad()
    {
        fadeScript.StartFade(true);
        while (!fadeScript.HasFaded())
        {
            yield return(new WaitForSeconds(0.1f));
        }

        yield return(new WaitForSeconds(0.5f));

        fadeScript.StartFade(false);
        while (!fadeScript.HasFaded())
        {
            yield return(new WaitForSeconds(0.1f));
        }

        SceneManager.LoadScene(versionInitialScene[(int)version]);
    }
    void AddFade(Transform t)
    {
        FadeUI scr = t.GetComponent <FadeUI>();

        if (scr == null)
        {
            scr              = t.gameObject.AddComponent <FadeUI>();
            scr.delay        = delay;
            scr.speed        = speed;
            scr.child        = true;
            scr.splashScreen = splashScreen;
            childFades.Add(scr);
            scr.StartFade(true);
        }
    }
 public void Fade(float min, float max, bool mustLigthen, float duration)
 {
     fadeUIScript.StartFade(min, max, mustLigthen, duration);
 }