protected override void OnInspectorGUI(GameDataSettings settings, GameDataServiceItem item, System.Action onReset, GUISkin skin) { if (settings == null) { return; } var data = FlowSystem.GetData(); if (data == 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) { GameDataSystem.TryToSaveCSV(res.data); } item.processing = false; })); //}; }); } } UnityEditor.EditorGUI.EndDisabledGroup(); }
public override void EditorLoad(GameDataSettings settings, GameDataServiceItem 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) { GameDataSystem.TryToSaveCSV(res.data); } item.processing = false; })); //}; }); } }
protected override void OnInspectorGUI(GameDataSettings settings, GameDataServiceItem item, System.Action onReset, GUISkin skin) { if (settings == null) { return; } var data = FlowSystem.GetData(); if (data == null) { return; } if (settings.url == null) { settings.url = string.Empty; } 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(GameDataSettings settings, GameDataServiceItem item, System.Action onReset, GUISkin skin) { if (settings == null) return; var data = FlowSystem.GetData(); if (data == 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) { GameDataSystem.TryToSaveCSV(res.data); } item.processing = false; })); //}; }); } } UnityEditor.EditorGUI.EndDisabledGroup(); }
protected virtual void OnInspectorGUI(GameDataSettings settings, GameDataServiceItem item, System.Action onReset, GUISkin skin) { }
public virtual void EditorLoad(GameDataSettings settings, GameDataServiceItem item) { }