瀏覽代碼

修复rename不能改回原文件名的问题

wgl 5 月之前
父節點
當前提交
3117296a58
共有 1 個文件被更改,包括 12 次插入12 次删除
  1. 12 12
      ActionTowerDefense/Assets/GameLevelEditor/GameMap/CoreScripts/Editor/GameMapEditor.cs

+ 12 - 12
ActionTowerDefense/Assets/GameLevelEditor/GameMap/CoreScripts/Editor/GameMapEditor.cs

@@ -767,18 +767,18 @@ public class GameMapEditor : EditorWindow
 		string s = wiz.text;
 		wiz.Close();
 
-		if (!string.IsNullOrEmpty(s) && s != asset.maps[mapIdx].showIdent)
-		{
-			if (StringIsUnique(asset.maps, s))
-			{
-				Undo.RecordObject(asset, "Rename map");
-				asset.maps[mapIdx].showIdent = s;
-			}
-			else
-			{
-				EditorUtility.DisplayDialog("Error", "The map name must be unique.", "OK");
-			}
-		}
+		//if (!string.IsNullOrEmpty(s) && s != asset.maps[mapIdx].showIdent)
+		//{
+		//	if (StringIsUnique(asset.maps, s))
+		//	{
+		//		Undo.RecordObject(asset, "Rename map");
+		//		asset.maps[mapIdx].showIdent = s;
+		//	}
+		//	else
+		//	{
+		//		EditorUtility.DisplayDialog("Error", "The map name must be unique.", "OK");
+		//	}
+		//}
 
 		Repaint();
 	}