private void InitField() { m_settings = SsiSettings.LoadInstance(); m_sheetUrl = m_settings.SheetId; m_sheetName = m_settings.SheetName; m_apiKey = m_settings.ApiKey; }
private void OnGUI() { GUIStyle centerBold = new GUIStyle() { alignment = TextAnchor.MiddleCenter, fontStyle = FontStyle.Bold, }; EditorGUILayout.BeginVertical(GUI.skin.box); { EditorGUILayout.LabelField("Settings", centerBold); EditorGUILayout.Space(); m_row = EditorGUILayout.TextField("Row (1, 2, 3, …)", m_row); EditorGUILayout.Space(); m_colF = EditorGUILayout.TextField("From (A, B, C …)", m_colF); EditorGUILayout.Space(); m_colT = EditorGUILayout.TextField("To (A, B, C …)", m_colT); EditorGUILayout.Space(); m_script = (ScriptableObject)EditorGUILayout.ObjectField("Scriptable Object", m_script, typeof(ScriptableObject), true); EditorGUILayout.Space(); m_showLog = EditorGUILayout.Toggle("Show Log", m_showLog); EditorGUILayout.Space(); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.Space(); if (GUILayout.Button("Download", GUILayout.Width(100), GUILayout.Height(30))) { //if (m_sheetId != null && m_sheetName != null && m_apiKey != null) { InitField(); m_settings = SsiSettings.LoadInstance(); m_sheetUrl = m_settings.SheetId; m_sheetName = m_settings.SheetName; m_apiKey = m_settings.ApiKey; DownloadJsonData(); //} } EditorGUILayout.Space(); } EditorGUILayout.EndHorizontal(); // EditorGUILayout.Space(); // EditorGUILayout.Space(); // // EditorGUILayout.BeginHorizontal(); // { // EditorGUILayout.Space(); // if (GUILayout.Button("Upload", GUILayout.Width(100), GUILayout.Height(30))) { // } // EditorGUILayout.Space(); // } // EditorGUILayout.EndHorizontal(); }