private void Awake()
    {
        if (File.Exists(Application.dataPath + pathSave))
        {
            varSave = (VarSave)file.Load(pathSave);
        }
        else
        {
            file.Save(pathSave, varSave);
        }

        switch (GetInt("Ratio"))
        {
        case 0:
            RatioScreen = 1.7777777777777f;
            break;

        case 1:
            RatioScreen = 1.3333333333333f;
            break;
        }

        if (instance != null)
        {
            Debug.LogError("Plus d'un Object ManagerSettingsUI dans la scene.");
        }
        else
        {
            instance = this;
        }
    }
Example #2
0
    void Start()
    {
        GetComponent <AudioSource>().clip = audioClip;
        GetComponent <AudioSource>().Play();
        OpenMenu(0);

        VarSave varSave = managerSettingsUI.getVarSave();

        managerSettingsUI.traduction.ValueChangeCheck(varSave.varSaveInts[0].value);
        managerKeys.load();
    }
    public VarSave getVarSave()
    {
        if (File.Exists(Application.dataPath + pathSave))
        {
            varSave = (VarSave)file.Load(pathSave);
        }
        else
        {
            file.Save(pathSave, varSave);
        }


        return(varSave);
    }
    public void CategoryOpen(int value)
    {
        for (int i = 0; i < listCategory.Count; i++)
        {
            if (listCategory[i].Category != null)
            {
                if (listCategory[i].Category.activeSelf)
                {
                    listCategory[i].Category.SetActive(false);
                }
            }
        }

        if (listCategory[value].Category != null)
        {
            listCategory[value].Category.SetActive(true);
        }

        varSave = (VarSave)file.Load(pathSave);
    }