protected override void OnInspectorGUI(LocalizationSettings settings, LocalizationServiceItem item, System.Action onReset, GUISkin skin) { //var data = FlowSystem.GetData(); if (settings == null) { return; } GUILayout.Label("URL:"); var newKey = GUILayout.TextArea(settings.url); if (newKey != settings.url) { settings.url = newKey; UnityEditor.EditorUtility.SetDirty(settings); } GUILayout.Label(string.Format("ETag: {0}", settings.eTag)); UnityEditor.EditorGUI.BeginDisabledGroup(item.processing); if (GUILayout.Button(item.processing == true ? "Loading..." : "Load", skin.button) == true) { this.EditorLoad(settings, item); } UnityEditor.EditorGUI.EndDisabledGroup(); }
protected override void OnInspectorGUI(LocalizationSettings settings, LocalizationServiceItem item, System.Action onReset, GUISkin skin) { //var data = FlowSystem.GetData(); if (settings == null) { return; } GUILayout.Label("URL:"); var newKey = GUILayout.TextArea(settings.url); if (newKey != settings.url) { settings.url = newKey; UnityEditor.EditorUtility.SetDirty(settings); } UnityEditor.EditorGUI.BeginDisabledGroup(item.processing); if (GUILayout.Button(item.processing == true ? "Loading..." : "Load", skin.button) == true) { if (item.processing == false) { item.processing = true; // Connecting this.OnEditorAuth(item.authKey, (result) => { //UnityEditor.EditorApplication.delayCall += () => { this.StartCoroutine(this.GetData(settings.url, (res) => { if (res.hasError == false) { LocalizationSystem.TryToSaveCSV(res.data); } item.processing = false; })); //}; }); } } UnityEditor.EditorGUI.EndDisabledGroup(); }
public override void EditorLoad(LocalizationSettings settings, LocalizationServiceItem item) { if (item.processing == false) { item.processing = true; // Connecting this.OnEditorAuth(item.authKey, (result) => { //UnityEditor.EditorApplication.delayCall += () => { this.StartCoroutine(this.GetData(settings, (res) => { if (res.hasError == false) { LocalizationSystem.TryToSaveCSV(res.data); } item.processing = false; })); //}; }); } }
protected virtual void OnInspectorGUI(LocalizationSettings settings, LocalizationServiceItem item, System.Action onReset, GUISkin skin) { }
public virtual void EditorLoad(LocalizationSettings settings, LocalizationServiceItem item) { }
protected override void OnInspectorGUI(LocalizationSettings settings, LocalizationServiceItem item, System.Action onReset, GUISkin skin) { //var data = FlowSystem.GetData(); if (settings == null) return; GUILayout.Label("URL:"); var newKey = GUILayout.TextArea(settings.url); if (newKey != settings.url) { settings.url = newKey; UnityEditor.EditorUtility.SetDirty(settings); } UnityEditor.EditorGUI.BeginDisabledGroup(item.processing); if (GUILayout.Button(item.processing == true ? "Loading..." : "Load", skin.button) == true) { if (item.processing == false) { item.processing = true; // Connecting this.OnEditorAuth(item.authKey, (result) => { //UnityEditor.EditorApplication.delayCall += () => { this.StartCoroutine(this.GetData(settings.url, (res) => { if (res.hasError == false) { LocalizationSystem.TryToSaveCSV(res.data); } item.processing = false; })); //}; }); } } UnityEditor.EditorGUI.EndDisabledGroup(); }