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; } } }
public void SwitchDataset() { dataset = GameManager.Instance.CurrentDataset; datasetNameLabel.text = dataset.Name; syncCountLabel.text = SdkUtils.ConvertSyncRevisionToString(dataset.GetLastSyncRevision()); }
public void OnSuccess(IDataset dataset) { _dialogController.Show("Sync success"); syncCountLabel.text = SdkUtils.ConvertSyncRevisionToString(dataset.GetLastSyncRevision()); }