Преглед изворни кода

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

wgl пре 5 месеци
родитељ
комит
3117296a58

+ 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();
 	}