标签:
using UnityEditor; using System.IO; using UnityEngine; public class SC { [MenuItem("Assets/批量修改名字")] public static void PlacePrfab() { Object[] slecets = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets); foreach (Object item in slecets) { if (Path.GetExtension(AssetDatabase.GetAssetPath(item))!="") { string path = AssetDatabase.GetAssetPath(item); if(item.name.StartsWith("gt")) { var a = item.name.Substring(2); AssetDatabase.RenameAsset(path,"SCPoker"+a); } } } AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); } }
标签:
原文地址:http://www.cnblogs.com/602147629/p/4974334.html