public override void OnInspectorGUI() { // DrawDefaultInspector(); place = target as SearchPlace; if (place != null) { GUILayout.BeginHorizontal("Box"); GUILayout.Label("Enter location name", LayerSettingWindows.GuiTitleSize(14, TextAnchor.MiddleCenter, Color.black)); place.namePlace = EditorGUILayout.TextField("", place.namePlace, GUILayout.Height(20)); GUILayout.EndHorizontal(); // Debug.Log(place.namePlace == String.Empty); if (place.namePlace == String.Empty) { place.namePlaceСache = ""; place.DataStructure.dataChache.Clear(); EditorGUILayout.HelpBox("Enter place name", MessageType.Info); } else { place.SearchInOSM(); } if (place.DataStructure.dataChache != null) { EditorGUILayout.Separator(); ShowSaveLocation(); EditorGUILayout.Separator(); ShowFoundLocation(); } } Repaint(); }
/* --------------------------------------- * PerformSearch: Used to control the start of searches * --------------------------------------- */ private void PerformSearch() { if (address != null && address.Trim() != "" && lastSearch != address) { place.namePlace = address; place.SearchInOSM(); lastSearch = address; } }
/* --------------------------------------- * PerformSearch: Used to control the start of searches * --------------------------------------- */ private void PerformSearch() { if (Value != null && Value.Trim() != "" && lastSearch != Value) { place.namePlace = Value; place.SearchInOSM(); lastSearch = Value; } }