示例#1
0
    void Start()
    {
        string version = Application.version;

        if (version != null)
        {
            versionCodeField.text = "v " + version;
        }

        deviceName.text = "Device name: " + PersistentData.Instance.serverLogin.deviceName;

        expirationDate.text  = "Expiration date: " + PersistentData.Instance.serverLogin.expiredDay;
        expirationDate.text += "/" + PersistentData.Instance.serverLogin.expiredMonth;
        expirationDate.text += "/" + PersistentData.Instance.serverLogin.expiredDay;

        debbugField.text = "";

        foreach (VoicesManager.AvailableLang al in VoicesManager.Instance.availableLangs)
        {
            UnityEngine.UI.Toggle t = Instantiate(toggleButton);
            t.GetComponent <ToogleCustom>().Init(al.lang, al.available);
            t.transform.SetParent(container);
            t.transform.localScale       = Vector3.one;
            t.transform.localEulerAngles = Vector3.zero;
            t.transform.localPosition    = Vector3.zero;
            buttons.Add(t);
        }
    }