示例#1
0
 private void FindObject(string path)
 {
     if (!string.IsNullOrEmpty(path))
     {
         Regex           guidRegex = new Regex("m_Script: {fileID: (.*), guid: (?<GuidValue>.*?), type:");
         MatchCollection matchList = guidRegex.Matches(File.ReadAllText(path));
         if (matchList != null)
         {
             MissComponentInfo info = new MissComponentInfo(path);
             for (int i = 0; i < matchList.Count; i++)
             {
                 string guid = matchList[i].Groups["GuidValue"].Value;
                 string p    = AssetDatabase.GUIDToAssetPath(guid);
                 if (string.IsNullOrEmpty(p) || !File.Exists(p))
                 {
                     MissComponent mc = new MissComponent(guid, p);
                     info.AddComponent(mc);
                 }
             }
             if (info.components.Count > 0)
             {
                 m_infos.Add(info);
             }
         }
     }
 }
示例#2
0
 public void AddComponent(MissComponent component)
 {
     m_components.Add(component);
 }