public override void OnInspectorGUI() { //base.OnInspectorGUI (); DrawDefaultInspector(); TiledMapGeneration map = (TiledMapGeneration)target; list = new string[map.tileObjects.Length]; for (int i = 0; i < list.Length; i++) { list[i] = map.tileObjects[i].name; } selected = EditorGUILayout.Popup(selected, list); size = EditorGUILayout.IntField(size); if (GUILayout.Button("Reset Tile Map")) { if (EditorUtility.DisplayDialog("Confirm Hard Reset", "Are you sure you want to delete previous tilemap and reset a new one?", "Yes, I'm one hundred percent sure", "No")) { map.BuildMesh(true); } } if (GUILayout.Button("Build Tile Map")) { map.BuildMesh(false); } }
public override void OnInspectorGUI() { //base.OnInspectorGUI (); DrawDefaultInspector(); if (GUILayout.Button("Rebuild Tile Map")) { TiledMapGeneration map = (TiledMapGeneration)target; map.BuildMesh(); } }