少年修仙传客户端基础资源
dabaoji
2025-06-09 8ee0256378cbf5dbc9d76ed10b60b65a844ef4dd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System.Collections;
using System.Collections.Generic;
using vnxbqy.UI;
using UnityEngine;
using UnityEditor;
using System;
 
public class DeleteStar : MonoBehaviour
{
 
    private static void DeleteStarInPrefab()
    {
        try
        {
            var ids = new List<string>();
            ids.AddRange(AssetDatabase.FindAssets("t:Prefab", new string[] { "Assets/ResourcesOut/UI/Window" }));
            ids.AddRange(AssetDatabase.FindAssets("t:Prefab", new string[] { "Assets/ResourcesOut/UI/PriorityWindow" }));
            ids.AddRange(AssetDatabase.FindAssets("t:Prefab", new string[] { "Assets/ResourcesOut/UI/Prefab" }));
 
            var totalCount = ids.Count;
            for (int i = 0; i < ids.Count; i++)
            {
                var path = AssetDatabase.GUIDToAssetPath(ids[i]);
                EditorUtility.DisplayProgressBar("整理ItemCell", string.Format("整理:{0}", path), i / (float)totalCount);
                var getObj = AssetDatabase.LoadAssetAtPath<GameObject>(path);
                var itemCellList = getObj.transform.GetComponentsInChildren<ItemCell>(true);//返回这个物体下的item对形象的item脚本数组
                if (itemCellList == null)
                {
                    continue;
                }
            }
        }
        catch (Exception ex)
        {
            Debug.Log(ex);
        }
        finally
        {
            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();
            EditorUtility.ClearProgressBar();
        }
 
    }
 
}