void Awake()
    {
        CloudSaveInitializer.AttachToGameObject(gameObject);
        gameObject.AddComponent <GameManager>();
        dataset = GameManager.Instance.CurrentDataset;
        datasetNameLabel.text = dataset.Name;
        syncCountLabel.text   = SdkUtils.ConvertSyncRevisionToString(dataset.GetLastSyncRevision());

        _dialogController   = GetComponent <DialogController>();
        _conflictController = GetComponent <ConflictController>();

        List <Dropdown.OptionData> options = new List <Dropdown.OptionData>();

        foreach (KeyValuePair <string, string> entry in GameManager.Instance.EndPoints)
        {
            options.Add(new Dropdown.OptionData(entry.Key));
        }

        _dropdown.AddOptions(options);

        for (int i = 0; i < options.Count; i++)
        {
            var option = options[i];
            if (option.text.Equals(GameManager.Instance._endpoint))
            {
                _dropdown.value = i;
                break;
            }
        }
    }
Esempio n. 2
0
 void Awake()
 {
     Instance = this;
 }
Esempio n. 3
0
 void Awake()
 {
     Instance = this;
 }